loadWindowVariables und variablesSlice entfernt und die daten ausgelagert und chaeckSession.ts erstellt

This commit is contained in:
Ismail Ali
2025-03-26 21:55:55 +01:00
parent c5e978e221
commit 0bec3fb148
4 changed files with 21 additions and 105 deletions

14
utils/checkSession.ts Normal file
View File

@@ -0,0 +1,14 @@
// utils/checkSession.ts
export async function checkSession(): Promise<boolean> {
try {
// Beispiel: prüfe ob ein erwartetes globales Fenster-Objekt noch existiert
const expectedGlobalVar = "win_kueID"; // oder "win_deviceName", je nach System
if (typeof window === "undefined") return false;
return window[expectedGlobalVar] !== undefined;
} catch (error) {
return false;
}
}