diff --git a/web/src/routes/(user)/photos/+page.svelte b/web/src/routes/(user)/photos/+page.svelte
index 6cf3bdd644..e74a109b92 100644
--- a/web/src/routes/(user)/photos/+page.svelte
+++ b/web/src/routes/(user)/photos/+page.svelte
@@ -24,7 +24,6 @@
import { assetViewingStore } from '$lib/stores/asset-viewing.store';
import { mdiDotsVertical, mdiPlus } from '@mdi/js';
import UpdatePanel from '$lib/components/shared-components/update-panel.svelte';
- import { user } from '$lib/stores/user.store';
export let data: PageData;
@@ -34,8 +33,6 @@
const assetInteractionStore = createAssetInteractionStore();
const { isMultiSelectState, selectedAssets } = assetInteractionStore;
- $user = data.user;
-
$: isAllFavorite = Array.from($selectedAssets).every((asset) => asset.isFavorite);
const handleEscape = () => {
diff --git a/web/src/routes/(user)/sharing/+page.svelte b/web/src/routes/(user)/sharing/+page.svelte
index 982e4c3c52..904901053d 100644
--- a/web/src/routes/(user)/sharing/+page.svelte
+++ b/web/src/routes/(user)/sharing/+page.svelte
@@ -27,7 +27,7 @@
},
});
- goto('/albums/' + newAlbum.id);
+ goto(`${AppRoute.ALBUMS}/${newAlbum.id}`);
} catch (e) {
notificationController.show({
message: 'Error creating album, check console for more details',
@@ -66,7 +66,7 @@
{#each data.partners as partner (partner.id)}
diff --git a/web/src/routes/+layout.ts b/web/src/routes/+layout.ts
index d59082b9aa..77d19fc9a0 100644
--- a/web/src/routes/+layout.ts
+++ b/web/src/routes/+layout.ts
@@ -1,5 +1,6 @@
-import { api } from '../api';
+import { api } from '@api';
import type { LayoutLoad } from './$types';
+import { getSavedUser, setUser } from '$lib/stores/user.store';
const getUser = async () => {
try {
@@ -14,7 +15,12 @@ export const ssr = false;
export const csr = true;
export const load = (async () => {
- const user = await getUser();
+ const savedUser = getSavedUser();
+ const user = savedUser || (await getUser());
+
+ if (!savedUser) {
+ setUser(user);
+ }
return {
user,
diff --git a/web/src/routes/+page.svelte b/web/src/routes/+page.svelte
index aa1af07eec..17a2b62fc3 100644
--- a/web/src/routes/+page.svelte
+++ b/web/src/routes/+page.svelte
@@ -1,7 +1,7 @@
@@ -12,8 +12,10 @@
Welcome to IMMICH Web
-
+
+
+