From: PhiTux Date: Fri, 18 Jul 2025 17:00:34 +0000 (+0200) Subject: fixed bug to compile frontend X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=f9da0927ce63750e1594dd7f73491a1a95d75c61;p=DailyTxT.git fixed bug to compile frontend --- diff --git a/frontend/src/lib/DatepickerLogic.svelte b/frontend/src/lib/DatepickerLogic.svelte index 9e2212f..650aa20 100644 --- a/frontend/src/lib/DatepickerLogic.svelte +++ b/frontend/src/lib/DatepickerLogic.svelte @@ -2,7 +2,6 @@ import { API_URL } from '$lib/APIurl.js'; import { cal } from '$lib/calendarStore.js'; import axios from 'axios'; - import { currentUser } from '$lib/helpers.js'; $effect(() => { if ($cal.currentMonth || $cal.currentYear) { @@ -18,11 +17,6 @@ return; } - if (!$currentUser) { - console.log('User not logged in, skipping loadMarkedDays'); - return; - } - if (isLoadingMarkedDays) { return; } diff --git a/frontend/src/routes/+layout.svelte b/frontend/src/routes/+layout.svelte index ab5f4a4..9ffc4a5 100644 --- a/frontend/src/routes/+layout.svelte +++ b/frontend/src/routes/+layout.svelte @@ -9,7 +9,7 @@ import { page } from '$app/state'; import { API_URL } from '$lib/APIurl.js'; import trianglify from 'trianglify'; - import { alwaysShowSidenav, currentUser } from '$lib/helpers.js'; + import { alwaysShowSidenav } from '$lib/helpers.js'; let { children } = $props(); let inDuration = 150; @@ -35,7 +35,6 @@ .get(API_URL + '/users/logout') .then((response) => { localStorage.removeItem('user'); - $currentUser = null; goto(`/login?error=${error.response.status}`); }) .catch((error) => { diff --git a/frontend/src/routes/login/+page.svelte b/frontend/src/routes/login/+page.svelte index 74dd068..52c3e33 100644 --- a/frontend/src/routes/login/+page.svelte +++ b/frontend/src/routes/login/+page.svelte @@ -5,7 +5,6 @@ import axios from 'axios'; import { goto } from '$app/navigation'; import { API_URL } from '$lib/APIurl.js'; - import { currentUser } from '$lib/helpers'; let show_login_failed = $state(false); let show_login_warning_empty_fields = $state(false); @@ -124,8 +123,6 @@ axios .post(API_URL + '/users/login', { username, password }) .then((response) => { - $currentUser = response.data.username; - if (response.data.migration_started) { is_migrating = true;