Migrate frontend from /stores to /state

This commit is contained in:
leedoughty 2025-08-19 18:36:09 +01:00
parent b92eabf4ae
commit eb713853e2
3 changed files with 7 additions and 7 deletions

View file

@ -3,9 +3,9 @@ Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="ts">
import { page } from "$app/stores";
import { page } from "$app/state";
$: message = $page.error!.message;
$: message = page.error!.message;
</script>
{message}

View file

@ -3,7 +3,7 @@ Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="ts">
import { page } from "$app/stores";
import { page } from "$app/state";
import CardInfo from "../CardInfo.svelte";
import type { PageData } from "./$types";
@ -11,7 +11,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
export let data: PageData;
const showRevlog = $page.url.searchParams.get("revlog") !== "0";
const showRevlog = page.url.searchParams.get("revlog") !== "0";
globalThis.anki ||= {};
globalThis.anki.updateCard = async (card_id: string): Promise<void> => {

View file

@ -3,7 +3,7 @@ Copyright: Ankitects Pty Ltd and contributors
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
-->
<script lang="ts">
import { page } from "$app/stores";
import { page } from "$app/state";
import CardInfo from "../../CardInfo.svelte";
import type { PageData } from "./$types";
@ -11,8 +11,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
export let data: PageData;
const showRevlog = $page.url.searchParams.get("revlog") !== "0";
const showCurve = $page.url.searchParams.get("curve") !== "0";
const showRevlog = page.url.searchParams.get("revlog") !== "0";
const showCurve = page.url.searchParams.get("curve") !== "0";
globalThis.anki ||= {};
globalThis.anki.updateCardInfos = async (card_id: string): Promise<void> => {