the size of AuthenticatedLayout is real

This commit is contained in:
Lara 2024-11-06 00:09:44 +02:00
parent 441903800f
commit c12d47b749
Signed by: laratheprotogen
GPG key ID: 5C0296EB3165F98B
2 changed files with 3 additions and 1 deletions

View file

@ -8,12 +8,13 @@
const searchChanged = () => {
if ($page.url !== '/search') {
globalState.lastPage = $page.url
router.visit('/search', {
preserveState: true,
})
}
if ($page.url === '/search' && globalState.searchQuery === '') {
router.visit('/', {
router.visit(globalState.lastPage ?? '/', {
preserveState: true,
})
}

View file

@ -3,6 +3,7 @@ import type { Snippet } from 'svelte';
export const globalState: {
title?: Snippet;
searchQuery?: string;
lastPage?: string;
} = $state({
})