This commit is contained in:
2025-05-03 11:01:10 +01:00
parent 4ed42678f1
commit 4541b366e5

View File

@ -1,7 +1,7 @@
import { type Component, type JSX, Show } from "solid-js";
import { jwtDecode } from "jwt-decode";
import { Navigate } from "@solidjs/router";
import { saveToken } from "tauri-plugin-ios-shared-token-api";
import { save_token } from "tauri-plugin-ios-shared-token-api";
export const isTokenValid = (): boolean => {
const token = localStorage.getItem("access");
@ -29,7 +29,7 @@ export const ProtectedRoute: Component<{ children?: JSX.Element }> = (
throw new Error("unreachable");
}
saveToken(token)
save_token(token)
.then(() => console.log("Saved token!!!"))
.catch((e) => console.error(e));
}