Skip to content

Commit

Permalink
fix: use new $app/state module
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin-w151 committed Feb 21, 2025
1 parent 1b9d54d commit 1ac45ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/lib/components/shared/content/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import ButtonLink from '$lib/components/shared/controls/ButtonLink.svelte';
import { refreshNews } from '$lib/stores/newsEvents';
import { defaultPadding } from '$lib/utils/styles';
import { page } from '$app/stores';
import { page } from '$app/state';
import Button from '../controls/Button.svelte';
import news from '$lib/stores/news';
import notifications from '$lib/stores/notifications';
Expand All @@ -20,7 +20,7 @@
const headerTitleClass = 'focus:bg-blue-100 dark:focus:bg-blue-900 outline-none rounded-md';
const headerActionsClass = 'flex gap-2';
let isNewsPage = $derived($page.url.pathname === '/');
let isNewsPage = $derived(page.url.pathname === '/');
function handleRefreshButtonClick(): void {
refreshNews.notify();
Expand Down
4 changes: 2 additions & 2 deletions src/routes/+error.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<script lang="ts">
import { page } from '$app/stores';
import { page } from '$app/state';
import { error, redirect } from '@sveltejs/kit';
const path = $page.url.pathname;
const path = page.url.pathname;
if (path === '/favicon.ico') {
error(404, 'Not found');
}
Expand Down

0 comments on commit 1ac45ac

Please sign in to comment.