the size of AuthenticatedLayout is real
This commit is contained in:
parent
441903800f
commit
c12d47b749
2 changed files with 3 additions and 1 deletions
|
@ -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,
|
||||
})
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ import type { Snippet } from 'svelte';
|
|||
export const globalState: {
|
||||
title?: Snippet;
|
||||
searchQuery?: string;
|
||||
lastPage?: string;
|
||||
} = $state({
|
||||
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue