Cleanup some (unused) code
This commit is contained in:
@@ -86,6 +86,7 @@
|
||||
{/if}
|
||||
</div>
|
||||
</a>
|
||||
|
||||
{#if location.photos.length}
|
||||
<div class="location__photos">
|
||||
{#each location.photos as { image }, index}
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
|
||||
<div class="cart__content">
|
||||
{#if $cartAmount > 0}
|
||||
{#each $cartData.items as item, index}
|
||||
{#each $cartData.items as item}
|
||||
<CartItem {item}
|
||||
on:updatedQuantity={changedQuantity}
|
||||
on:removed={removedItem}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
$: globeResolution = innerWidth > 1440 && window.devicePixelRatio > 1 ? '4k' : '2k'
|
||||
|
||||
const { continents, locations } = getContext('global')
|
||||
const randomContinent = getRandomItem(continents.filter((cont: any) => cont.countries))
|
||||
const randomContinent: any = getRandomItem(continents.filter((cont: any) => cont.countries))
|
||||
const markers = locations.map(({ name, slug, country, globe_close: isClose, coordinates: { coordinates }}: any) => ({
|
||||
name,
|
||||
slug,
|
||||
@@ -91,11 +91,10 @@
|
||||
entries.forEach(({ isIntersecting }: IntersectionObserverEntry) => {
|
||||
if (isIntersecting) {
|
||||
globe.enable()
|
||||
console.log('IO enable globe')
|
||||
console.log('globe: IO enable')
|
||||
} else {
|
||||
globe.disable()
|
||||
console.log('IO disable globe')
|
||||
|
||||
console.log('globe: IO disable')
|
||||
}
|
||||
})
|
||||
}, {
|
||||
@@ -103,12 +102,6 @@
|
||||
rootMargin: '0px 0px 0px'
|
||||
})
|
||||
observer.observe(globeEl)
|
||||
|
||||
// const globeScroll = ScrollOut({
|
||||
// targets: scope,
|
||||
// onShown: () => globe.enable(),
|
||||
// onHidden: () => globe.disable()
|
||||
// })
|
||||
})
|
||||
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
})
|
||||
|
||||
// Photos MutationObserver
|
||||
mutationPhotos = new MutationObserver((mutationsList, observer) => {
|
||||
mutationPhotos = new MutationObserver((mutationsList) => {
|
||||
// When adding new childs
|
||||
for (const mutation of mutationsList) {
|
||||
if (mutation.type === 'childList') {
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
|
||||
<Cart />
|
||||
|
||||
<div class="notifications">
|
||||
{#each $cartNotifications as { id, title, name, image } (id)}
|
||||
<NotificationCart
|
||||
|
||||
Reference in New Issue
Block a user