diff --git a/modules/gui/src/components/NavBar/NavBar.svelte b/modules/gui/src/components/NavBar/NavBar.svelte deleted file mode 100644 index f818e45..0000000 --- a/modules/gui/src/components/NavBar/NavBar.svelte +++ /dev/null @@ -1,136 +0,0 @@ - - - - - diff --git a/modules/gui/src/components/SearchPopupResults/SearchPopupResults.svelte b/modules/gui/src/components/SearchPopupResults/SearchPopupResults.svelte index 2444caa..67458bd 100644 --- a/modules/gui/src/components/SearchPopupResults/SearchPopupResults.svelte +++ b/modules/gui/src/components/SearchPopupResults/SearchPopupResults.svelte @@ -123,8 +123,8 @@ diff --git a/modules/gui/src/libs/stores.ts b/modules/gui/src/libs/stores.ts index af5097f..e29fa29 100644 --- a/modules/gui/src/libs/stores.ts +++ b/modules/gui/src/libs/stores.ts @@ -6,6 +6,7 @@ import type { GUIPackage } from '$libs/types'; import { getPackages, getFeaturedPackages, getPackageReviews, getAllPosts } from '@api'; import initAuthStore from './stores/auth'; +import initNavStore from './stores/nav'; export const backLink = writable('/'); @@ -172,3 +173,5 @@ function initSearchStore() { export const searchStore = initSearchStore(); export const authStore = initAuthStore(); + +export const navStore = initNavStore(); diff --git a/modules/gui/src/libs/stores/nav.ts b/modules/gui/src/libs/stores/nav.ts new file mode 100644 index 0000000..b8d3729 --- /dev/null +++ b/modules/gui/src/libs/stores/nav.ts @@ -0,0 +1,10 @@ +import { writable } from 'svelte/store'; + +export default function initNavStore() { + const backLink = writable('/'); + + return { + backLink, + set: (newlink: string) => backLink.set(newlink) + }; +} diff --git a/modules/gui/src/routes/+layout.svelte b/modules/gui/src/routes/+layout.svelte index fa7a693..f349f5b 100644 --- a/modules/gui/src/routes/+layout.svelte +++ b/modules/gui/src/routes/+layout.svelte @@ -2,32 +2,19 @@ -
- +
+
- {#if backLink} -
- -
- {/if}
@@ -43,16 +30,11 @@