remove unnecessary logic
This commit is contained in:
parent
5aa429d7eb
commit
3f6913ef5f
13
package-lock.json
generated
13
package-lock.json
generated
@ -35,7 +35,6 @@
|
||||
"svelte": "^4.2.7",
|
||||
"svelte-check": "^3.6.2",
|
||||
"svelte-heros-v2": "^0.10.12",
|
||||
"svelte-local-storage-store": "^0.6.4",
|
||||
"svelte-multicssclass": "^2.1.1",
|
||||
"svelte-preprocess": "^5.1.1",
|
||||
"tailwindcss": "^3.3.5",
|
||||
@ -4938,18 +4937,6 @@
|
||||
"svelte": "^3.19.0 || ^4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/svelte-local-storage-store": {
|
||||
"version": "0.6.4",
|
||||
"resolved": "https://registry.npmjs.org/svelte-local-storage-store/-/svelte-local-storage-store-0.6.4.tgz",
|
||||
"integrity": "sha512-45WoY2vSGPQM1sIQJ9jTkPPj20hYeqm+af6mUGRFSPP5WglZf36YYoZqwmZZ8Dt/2SU8lem+BTA8/Z/8TkqNLg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.14"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"svelte": "^3.48.0 || >4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/svelte-multicssclass": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/svelte-multicssclass/-/svelte-multicssclass-2.1.1.tgz",
|
||||
|
@ -32,7 +32,6 @@
|
||||
"svelte": "^4.2.7",
|
||||
"svelte-check": "^3.6.2",
|
||||
"svelte-heros-v2": "^0.10.12",
|
||||
"svelte-local-storage-store": "^0.6.4",
|
||||
"svelte-multicssclass": "^2.1.1",
|
||||
"svelte-preprocess": "^5.1.1",
|
||||
"tailwindcss": "^3.3.5",
|
||||
|
@ -1,9 +1,6 @@
|
||||
import { persisted } from 'svelte-local-storage-store';
|
||||
import type { Writable } from 'svelte/store';
|
||||
import { writable } from 'svelte/store';
|
||||
|
||||
export const playAudio: Writable<boolean> = persisted('playAudio', false);
|
||||
|
||||
export const errorMessage: Writable<string | null> = (() => {
|
||||
const store: Writable<string | null> = writable(null);
|
||||
return {
|
||||
|
@ -2,7 +2,6 @@
|
||||
import '../app.css';
|
||||
import { env } from '$env/dynamic/public';
|
||||
import { goto } from '$app/navigation';
|
||||
import { playAudio } from '$lib/stores';
|
||||
import { page } from '$app/stores';
|
||||
|
||||
let navPaths = [
|
||||
@ -93,10 +92,6 @@
|
||||
let activePath = navPaths.find((path) => path.active);
|
||||
if (activePath !== undefined) {
|
||||
goto(activePath.href);
|
||||
} else if ($playAudio) {
|
||||
new Audio(
|
||||
`${env.PUBLIC_BASE_PATH}/aud/chest-${showMenuPermanent ? 'close' : 'open'}.mp3`
|
||||
).play();
|
||||
}
|
||||
showMenuPermanent = !showMenuPermanent;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user