diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte
index e626869..b5311d3 100644
--- a/frontend/src/App.svelte
+++ b/frontend/src/App.svelte
@@ -1,108 +1,23 @@
diff --git a/frontend/src/helperComponents/AnimeTable.svelte b/frontend/src/helperComponents/AnimeTable.svelte
index 44be587..819ca2f 100644
--- a/frontend/src/helperComponents/AnimeTable.svelte
+++ b/frontend/src/helperComponents/AnimeTable.svelte
@@ -2,7 +2,7 @@
import {createTable, Render, Subscribe} from "svelte-headless-table";
// @ts-ignore
import { addSortBy } from "svelte-headless-table/plugins";
- import {tableItems} from "./GlobalVariablesAndHelperFunctions.svelte"
+ import {tableItems} from "../helperModules/GlobalVariablesAndHelperFunctions.svelte"
//when adding sort here is code { sort: addSortBy() }
const table = createTable(tableItems, { sort: addSortBy() })
diff --git a/frontend/src/helperComponents/AvatarMenu.svelte b/frontend/src/helperComponents/AvatarMenu.svelte
index cd886d4..0725efb 100644
--- a/frontend/src/helperComponents/AvatarMenu.svelte
+++ b/frontend/src/helperComponents/AvatarMenu.svelte
@@ -2,7 +2,7 @@
import {Avatar} from "flowbite-svelte";
import type {AniListUser} from "../anilist/types/AniListTypes";
- import {aniListLoggedIn, aniListUser, malLoggedIn, simklLoggedIn, logoutOfAniList, logoutOfMAL, logoutOfSimkl} from "./GlobalVariablesAndHelperFunctions.svelte"
+ import {aniListLoggedIn, aniListUser, malLoggedIn, simklLoggedIn, logoutOfAniList, logoutOfMAL, logoutOfSimkl} from "../helperModules/GlobalVariablesAndHelperFunctions.svelte"
import * as runtime from "../../wailsjs/runtime";
let currentAniListUser: AniListUser
diff --git a/frontend/src/helperComponents/Header.svelte b/frontend/src/helperComponents/Header.svelte
index 53d309d..834d072 100644
--- a/frontend/src/helperComponents/Header.svelte
+++ b/frontend/src/helperComponents/Header.svelte
@@ -10,13 +10,14 @@
malUser,
simklLoggedIn,
simklUser,
- } from "./GlobalVariablesAndHelperFunctions.svelte"
+ } from "../helperModules/GlobalVariablesAndHelperFunctions.svelte"
import type {AniListUser} from "../anilist/types/AniListTypes";
import type {SimklUser} from "../simkl/types/simklTypes";
import type {MyAnimeListUser} from "../mal/types/MALTypes";
import AvatarMenu from "./AvatarMenu.svelte";
import logo from "../assets/images/AniTrackLogo.svg"
import {location, pop} from "svelte-spa-router";
+ import {CheckIfAniListLoggedInAndLoadWatchList} from "../helperModules/CheckIfAniListLoggedInAndLoadWatchList.svelte";
let isAniListLoggedIn: boolean
let isSimklLoggedIn: boolean
@@ -42,7 +43,10 @@
{#if currentLocation === "/"}
{:else}
-
+
{/if}
diff --git a/frontend/src/helperComponents/Pagination.svelte b/frontend/src/helperComponents/Pagination.svelte
index 5ce8a23..8ec82f3 100644
--- a/frontend/src/helperComponents/Pagination.svelte
+++ b/frontend/src/helperComponents/Pagination.svelte
@@ -4,7 +4,7 @@
aniListWatchlist,
animePerPage,
watchListPage,
- } from "./GlobalVariablesAndHelperFunctions.svelte";
+ } from "../helperModules/GlobalVariablesAndHelperFunctions.svelte";
import type {AniListCurrentUserWatchList} from "../anilist/types/AniListCurrentUserWatchListType"
import {GetAniListUserWatchingList} from "../../wailsjs/go/main/App";
diff --git a/frontend/src/helperComponents/WatchList.svelte b/frontend/src/helperComponents/WatchList.svelte
index 77cccff..bb0d48b 100644
--- a/frontend/src/helperComponents/WatchList.svelte
+++ b/frontend/src/helperComponents/WatchList.svelte
@@ -4,7 +4,7 @@
aniListWatchlist,
GetAniListSingleItem,
loading,
- } from "./GlobalVariablesAndHelperFunctions.svelte";
+ } from "../helperModules/GlobalVariablesAndHelperFunctions.svelte";
import {push} from "svelte-spa-router";
import type {AniListCurrentUserWatchList} from "../anilist/types/AniListCurrentUserWatchListType"
import {Rating} from "flowbite-svelte";
diff --git a/frontend/src/helperComponents/AddAnimeServiceToTable.svelte b/frontend/src/helperModules/AddAnimeServiceToTable.svelte
similarity index 100%
rename from frontend/src/helperComponents/AddAnimeServiceToTable.svelte
rename to frontend/src/helperModules/AddAnimeServiceToTable.svelte
diff --git a/frontend/src/helperModules/CheckIfAniListLoggedInAndLoadWatchList.svelte b/frontend/src/helperModules/CheckIfAniListLoggedInAndLoadWatchList.svelte
new file mode 100644
index 0000000..81b35f6
--- /dev/null
+++ b/frontend/src/helperModules/CheckIfAniListLoggedInAndLoadWatchList.svelte
@@ -0,0 +1,31 @@
+
\ No newline at end of file
diff --git a/frontend/src/helperModules/CheckIfMyAnimeListLoggedIn.svelte b/frontend/src/helperModules/CheckIfMyAnimeListLoggedIn.svelte
new file mode 100644
index 0000000..8054578
--- /dev/null
+++ b/frontend/src/helperModules/CheckIfMyAnimeListLoggedIn.svelte
@@ -0,0 +1,25 @@
+
\ No newline at end of file
diff --git a/frontend/src/helperModules/CheckIsSimklLoggedIn.svelte b/frontend/src/helperModules/CheckIsSimklLoggedIn.svelte
new file mode 100644
index 0000000..706db11
--- /dev/null
+++ b/frontend/src/helperModules/CheckIsSimklLoggedIn.svelte
@@ -0,0 +1,29 @@
+
\ No newline at end of file
diff --git a/frontend/src/helperComponents/GlobalVariablesAndHelperFunctions.svelte b/frontend/src/helperModules/GlobalVariablesAndHelperFunctions.svelte
similarity index 100%
rename from frontend/src/helperComponents/GlobalVariablesAndHelperFunctions.svelte
rename to frontend/src/helperModules/GlobalVariablesAndHelperFunctions.svelte
diff --git a/frontend/src/routes/Anime.svelte b/frontend/src/routes/Anime.svelte
index cf019b4..d3cb7fb 100644
--- a/frontend/src/routes/Anime.svelte
+++ b/frontend/src/routes/Anime.svelte
@@ -6,7 +6,7 @@
malLoggedIn,
simklAnime,
simklLoggedIn,
- } from "../helperComponents/GlobalVariablesAndHelperFunctions.svelte";
+ } from "../helperModules/GlobalVariablesAndHelperFunctions.svelte";
import {pop} from "svelte-spa-router";
import {Button} from "flowbite-svelte";
import type {AniListGetSingleAnime} from "../anilist/types/AniListCurrentUserWatchListType";
@@ -26,7 +26,8 @@
SimklSyncRating,
SimklSyncStatus
} from "../../wailsjs/go/main/App";
- import {AddAnimeServiceToTable} from "../helperComponents/AddAnimeServiceToTable.svelte";
+ import {AddAnimeServiceToTable} from "../helperModules/AddAnimeServiceToTable.svelte";
+ import {CheckIfAniListLoggedInAndLoadWatchList} from "../helperModules/CheckIfAniListLoggedInAndLoadWatchList.svelte";
let isAniListLoggedIn: boolean
let isMalLoggedIn: boolean
@@ -434,7 +435,10 @@
class="text-gray-900 bg-white border border-gray-300 focus:outline-none hover:bg-gray-100 focus:ring-4
focus:ring-gray-100 font-medium rounded-lg text-sm px-5 py-2.5 me-2 mb-2 dark:bg-gray-800 dark:text-white
dark:border-gray-600 dark:hover:bg-gray-700 dark:hover:border-gray-600 dark:focus:ring-gray-700"
- on:click={() => pop()}>
+ on:click={async () => {
+ await CheckIfAniListLoggedInAndLoadWatchList()
+ return pop()
+ }}>
Back
diff --git a/frontend/src/routes/Home.svelte b/frontend/src/routes/Home.svelte
index 0a91b3d..25c523f 100644
--- a/frontend/src/routes/Home.svelte
+++ b/frontend/src/routes/Home.svelte
@@ -5,7 +5,7 @@ import {
aniListLoggedIn,
aniListPrimary,
loading,
-} from "../helperComponents/GlobalVariablesAndHelperFunctions.svelte";
+} from "../helperModules/GlobalVariablesAndHelperFunctions.svelte";
import loader from '../helperFunctions/loader'
let isAniListPrimary: boolean