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