mirror of
https://github.com/immich-app/immich.git
synced 2025-12-10 09:33:58 +09:00
chore: migrate to SvelteKit app state (#14807)
* chore: migrate to SvelteKit app state * update package-lock.json
This commit is contained in:
@@ -8,13 +8,13 @@
|
||||
<script lang="ts">
|
||||
import { writable, type Writable } from 'svelte/store';
|
||||
import { createContext } from '$lib/utils/context';
|
||||
import { page } from '$app/stores';
|
||||
import { page } from '$app/state';
|
||||
import { handlePromiseError } from '$lib/utils';
|
||||
import { goto } from '$app/navigation';
|
||||
import type { Snippet } from 'svelte';
|
||||
|
||||
const getParamValues = (param: string) => {
|
||||
return new Set(($page.url.searchParams.get(param) || '').split(' ').filter((x) => x !== ''));
|
||||
return new Set((page.url.searchParams.get(param) || '').split(' ').filter((x) => x !== ''));
|
||||
};
|
||||
|
||||
interface Props {
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
$effect(() => {
|
||||
if (queryParam && $state) {
|
||||
const searchParams = new URLSearchParams($page.url.searchParams);
|
||||
const searchParams = new URLSearchParams(page.url.searchParams);
|
||||
if ($state.size > 0) {
|
||||
searchParams.set(queryParam, [...$state].join(' '));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user