remove unnecessary logic
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user