Răsfoiți Sursa

move to portfolio if already authenticated

Daniel Bohry 9 luni în urmă
părinte
comite
e22ea17ccd
1 a modificat fișierele cu 1 adăugiri și 0 ștergeri
  1. 1 0
      src/routes/login/+page.svelte

+ 1 - 0
src/routes/login/+page.svelte

@@ -18,6 +18,7 @@
 			const storedAuth = localStorage.getItem('authentication');
 			const storedAuth = localStorage.getItem('authentication');
 			if (storedAuth) {
 			if (storedAuth) {
 				authentication.set(JSON.parse(storedAuth));
 				authentication.set(JSON.parse(storedAuth));
+				goto("/portfolio");
 			}
 			}
 		} catch (error) {
 		} catch (error) {
 			console.error('Error parsing stored auth:', error);
 			console.error('Error parsing stored auth:', error);