chore(web): migration svelte 5 syntax (#13883)

This commit is contained in:
Alex
2024-11-14 08:43:25 -06:00
committed by GitHub
parent 9203a61709
commit 0b3742cf13
310 changed files with 6435 additions and 4176 deletions
@@ -4,10 +4,11 @@
import type { AlbumResponseDto } from '@immich/sdk';
import { t } from 'svelte-i18n';
export let album: AlbumResponseDto;
interface Props {
album: AlbumResponseDto;
}
$: startDate = formatDate(album.startDate);
$: endDate = formatDate(album.endDate);
let { album }: Props = $props();
const formatDate = (date?: string) => {
return date ? new Date(date).toLocaleDateString($locale, dateFormats.album) : undefined;
@@ -24,6 +25,8 @@
return '';
};
let startDate = $derived(formatDate(album.startDate));
let endDate = $derived(formatDate(album.endDate));
</script>
<span class="my-2 flex gap-2 text-sm font-medium text-gray-500" data-testid="album-details">