diff --git a/apps/website/src/routes/(site)/[country]/[location]/+page.svelte b/apps/website/src/routes/(site)/[country]/[location]/+page.svelte index d4192c2..8cca38f 100644 --- a/apps/website/src/routes/(site)/[country]/[location]/+page.svelte +++ b/apps/website/src/routes/(site)/[country]/[location]/+page.svelte @@ -13,6 +13,7 @@ import { seenLocations } from '$utils/stores' import { photoFields } from '$utils/api' import { PUBLIC_LIST_INCREMENT } from '$env/static/public' + import { padZero } from 'utils/string' // Components import Metas from '$components/Metas.svelte' import Image from '$components/atoms/Image.svelte' @@ -294,7 +295,7 @@ location={location.name} ratio={width / height} date={date_taken} - index="{(totalPhotos - index < 10) ? '0' : ''}{totalPhotos - index}" + index={padZero(totalPhotos - index)} /> {/each} diff --git a/apps/website/src/routes/(site)/[country]/[location]/[photo]/+page.svelte b/apps/website/src/routes/(site)/[country]/[location]/[photo]/+page.svelte index a731633..48cef1d 100644 --- a/apps/website/src/routes/(site)/[country]/[location]/[photo]/+page.svelte +++ b/apps/website/src/routes/(site)/[country]/[location]/[photo]/+page.svelte @@ -13,8 +13,9 @@ import { getAssetUrlKey } from '$utils/api' import { previousPage } from '$utils/stores' import { DELAY } from '$utils/constants' - import { throttle } from 'utils/actions' import { swipe } from '$utils/interactions/swipe' + import { throttle } from 'utils/actions' + import { padZero } from 'utils/string' // Components import Metas from '$components/Metas.svelte' import SplitText from '$components/SplitText.svelte' @@ -354,7 +355,8 @@