Fix Photos page data reactivity and IntersectionObserver rootmargin
This commit is contained in:
@@ -32,8 +32,9 @@
|
|||||||
|
|
||||||
export let data: PageData
|
export let data: PageData
|
||||||
|
|
||||||
let { photos }: { photos: any[] } = data
|
let { photos, totalPhotos }: { photos: any[], totalPhotos: number } = data
|
||||||
const { totalPhotos, filteredCountryExists }: { totalPhotos: number, filteredCountryExists: boolean } = data
|
$: ({ photos, totalPhotos } = data)
|
||||||
|
const { filteredCountryExists }: { totalPhotos: number, filteredCountryExists: boolean } = data
|
||||||
const { countries, locations }: any = getContext('global')
|
const { countries, locations }: any = getContext('global')
|
||||||
|
|
||||||
dayjs.extend(relativeTime)
|
dayjs.extend(relativeTime)
|
||||||
@@ -266,7 +267,7 @@
|
|||||||
})
|
})
|
||||||
}, {
|
}, {
|
||||||
threshold: 0.25,
|
threshold: 0.25,
|
||||||
rootMargin: '0px 0px 10%'
|
rootMargin: '0px 0px 15%'
|
||||||
})
|
})
|
||||||
|
|
||||||
// Photos MutationObserver
|
// Photos MutationObserver
|
||||||
|
|||||||
Reference in New Issue
Block a user