chore: migrate to SvelteKit app state (#14807)

* chore: migrate to SvelteKit app state

* update package-lock.json
This commit is contained in:
Ben McCann 2024-12-20 15:18:22 -07:00 committed by GitHub
parent a14735846c
commit da70a1e457
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 171 additions and 136 deletions

View file

@ -1,6 +1,6 @@
<script lang="ts">
import { goto } from '$app/navigation';
import { page } from '$app/stores';
import { page } from '$app/state';
import Icon from '$lib/components/elements/icon.svelte';
import { ActionQueryParameterValue, AppRoute, QueryParameter } from '$lib/constants';
import { handleError } from '$lib/utils/handle-error';
@ -41,8 +41,8 @@
const handleSwapPeople = async () => {
[person, selectedPeople[0]] = [selectedPeople[0], person];
$page.url.searchParams.set(QueryParameter.ACTION, ActionQueryParameterValue.MERGE);
await goto(`${AppRoute.PEOPLE}/${person.id}?${$page.url.searchParams.toString()}`);
page.url.searchParams.set(QueryParameter.ACTION, ActionQueryParameterValue.MERGE);
await goto(`${AppRoute.PEOPLE}/${person.id}?${page.url.searchParams.toString()}`);
};
const onSelect = async (selected: PersonResponseDto) => {