Remove unused code and refactor types importing
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import anime from 'animejs'
|
||||
import type { AnimeParams } from 'animejs'
|
||||
import anime, { type AnimeParams } from 'animejs'
|
||||
import type { TransitionConfig } from 'svelte/transition'
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { cartId, cartData } from '$utils/stores/shop'
|
||||
import { cartId } from '$utils/stores/shop'
|
||||
import { addToCart } from '$utils/functions/shop'
|
||||
import { capitalizeFirstLetter } from '$utils/functions'
|
||||
// Components
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
<a href={url} sveltekit:noscroll tabindex="0">
|
||||
<figure class="house__image shadow-photo">
|
||||
<Image
|
||||
class="photo"
|
||||
id={photoId}
|
||||
sizeKey="photo-list"
|
||||
sizes={{
|
||||
@@ -46,7 +47,6 @@
|
||||
}}
|
||||
ratio={1.5}
|
||||
alt={photoAlt}
|
||||
class="photo"
|
||||
/>
|
||||
</figure>
|
||||
<span class="house__index title-index">
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
const moveProgress = (clientX - left) / width // 0 to 1
|
||||
|
||||
// Move horizontally
|
||||
offset.update($c => ({
|
||||
offset.update(_ => ({
|
||||
x: lerp(-56, 56, moveProgress),
|
||||
y: 0
|
||||
}))
|
||||
@@ -48,7 +48,7 @@
|
||||
}
|
||||
|
||||
// Leaving mouseover
|
||||
const handleMouseLeave = (event: MouseEvent) => {
|
||||
const handleMouseLeave = () => {
|
||||
offset.update($c => ({
|
||||
x: $c.x,
|
||||
y: 40
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from 'svelte'
|
||||
import { writable } from 'svelte/store'
|
||||
import EmblaCarousel from 'embla-carousel'
|
||||
import type { EmblaCarouselType } from 'embla-carousel'
|
||||
import EmblaCarousel, { type EmblaCarouselType } from 'embla-carousel'
|
||||
// Components
|
||||
import Image from '$components/atoms/Image.svelte'
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { getContext, onMount } from 'svelte'
|
||||
import EmblaCarousel from 'embla-carousel'
|
||||
import type { EmblaCarouselType } from 'embla-carousel'
|
||||
import EmblaCarousel, { type EmblaCarouselType } from 'embla-carousel'
|
||||
// Components
|
||||
import Poster from '$components/molecules/Poster.svelte'
|
||||
import EmailForm from '$components/molecules/EmailForm.svelte'
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { getContext, onMount } from 'svelte'
|
||||
import anime from 'animejs'
|
||||
import type { AnimeTimelineInstance } from 'animejs'
|
||||
import anime, { type AnimeTimelineInstance } from 'animejs'
|
||||
import { cartOpen } from '$utils/stores/shop'
|
||||
// Components
|
||||
import Image from '$components/atoms/Image.svelte'
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
import { throttle } from '$utils/functions'
|
||||
import { swipe } from '$utils/interactions/swipe'
|
||||
import dayjs from 'dayjs'
|
||||
import anime from 'animejs'
|
||||
import type { AnimeTimelineInstance } from 'animejs'
|
||||
import anime, { type AnimeTimelineInstance } from 'animejs'
|
||||
// Components
|
||||
import Metas from '$components/Metas.svelte'
|
||||
import SplitText from '$components/SplitText.svelte'
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { navigating, page } from '$app/stores'
|
||||
import { onMount } from 'svelte'
|
||||
import anime from 'animejs'
|
||||
import type { AnimeTimelineInstance } from 'animejs'
|
||||
import anime, { type AnimeTimelineInstance } from 'animejs'
|
||||
import dayjs from 'dayjs'
|
||||
import relativeTime from 'dayjs/plugin/relativeTime.js'
|
||||
import { getAssetUrlKey } from '$utils/helpers'
|
||||
|
||||
@@ -76,9 +76,7 @@
|
||||
<script context="module" lang="ts">
|
||||
import type { LoadEvent, LoadOutput } from '@sveltejs/kit'
|
||||
|
||||
export async function load ({ fetch, status }: LoadEvent): Promise<LoadOutput> {
|
||||
console.log(status)
|
||||
|
||||
export async function load ({ status }: LoadEvent): Promise<LoadOutput> {
|
||||
return {
|
||||
props: {
|
||||
status,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from 'svelte'
|
||||
import anime from 'animejs'
|
||||
import type { AnimeTimelineInstance } from 'animejs'
|
||||
import anime, { type AnimeTimelineInstance } from 'animejs'
|
||||
// Components
|
||||
import Metas from '$components/Metas.svelte'
|
||||
import PageTransition from '$components/PageTransition.svelte'
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/stores'
|
||||
import { getContext, onMount } from 'svelte'
|
||||
import anime from 'animejs'
|
||||
import type { AnimeTimelineInstance } from 'animejs'
|
||||
import anime, { type AnimeTimelineInstance } from 'animejs'
|
||||
import { DELAY } from '$utils/contants'
|
||||
import { sleep } from '$utils/functions'
|
||||
import { reveal, fade as animeFade } from '$animations/index'
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
import { quartOut } from 'svelte/easing'
|
||||
import dayjs from 'dayjs'
|
||||
import relativeTime from 'dayjs/plugin/relativeTime.js'
|
||||
import anime from 'animejs'
|
||||
import type { AnimeTimelineInstance } from 'animejs'
|
||||
import anime, { type AnimeTimelineInstance } from 'animejs'
|
||||
import { fetchAPI } from '$utils/api'
|
||||
import { map, lerp, throttle } from '$utils/functions'
|
||||
// Components
|
||||
@@ -262,7 +261,7 @@
|
||||
})
|
||||
|
||||
// Photos MutationObserver
|
||||
mutationPhotos = new MutationObserver((mutationsList, observer) => {
|
||||
mutationPhotos = new MutationObserver((mutationsList) => {
|
||||
for (const mutation of mutationsList) {
|
||||
// When adding new childs
|
||||
if (mutation.type === 'childList') {
|
||||
|
||||
@@ -44,9 +44,7 @@
|
||||
<script context="module" lang="ts">
|
||||
import type { LoadEvent, LoadOutput } from '@sveltejs/kit'
|
||||
|
||||
export async function load ({ fetch, status }: LoadEvent): Promise<LoadOutput> {
|
||||
console.log(status)
|
||||
|
||||
export async function load ({ status }: LoadEvent): Promise<LoadOutput> {
|
||||
return {
|
||||
props: {
|
||||
status,
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from 'svelte'
|
||||
import dayjs from 'dayjs'
|
||||
import anime from 'animejs'
|
||||
import type { AnimeTimelineInstance } from 'animejs'
|
||||
import anime, { type AnimeTimelineInstance } from 'animejs'
|
||||
// Components
|
||||
import Metas from '$components/Metas.svelte'
|
||||
import PageTransition from '$components/PageTransition.svelte'
|
||||
|
||||
Reference in New Issue
Block a user