loadWindowVariables und variablesSlice entfernt und die daten ausgelagert und chaeckSession.ts erstellt
This commit is contained in:
14
utils/checkSession.ts
Normal file
14
utils/checkSession.ts
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user