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