remove unnecessary logic

This commit is contained in:
2023-11-30 00:15:06 +01:00
parent 5aa429d7eb
commit 3f6913ef5f
4 changed files with 0 additions and 22 deletions

View File

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

View File

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