Cleanup some (unused) code

This commit is contained in:
2022-06-22 23:22:16 +02:00
parent 6d4224abea
commit 565c1c2be9
5 changed files with 7 additions and 12 deletions

View File

@@ -86,6 +86,7 @@
{/if}
</div>
</a>
{#if location.photos.length}
<div class="location__photos">
{#each location.photos as { image }, index}

View File

@@ -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}

View File

@@ -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()
// })
})

View File

@@ -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') {

View File

@@ -27,6 +27,7 @@
<Cart />
<div class="notifications">
{#each $cartNotifications as { id, title, name, image } (id)}
<NotificationCart