wip: migrate to desktop2

This commit is contained in:
2024-02-12 09:08:35 +07:00
parent c809ab6b4e
commit 1950cb59a2
25 changed files with 347 additions and 51 deletions

View File

@@ -0,0 +1,25 @@
import { createFileRoute, redirect } from "@tanstack/react-router";
import { invoke } from "@tauri-apps/api/core";
export const Route = createFileRoute("/")({
component: Index,
beforeLoad: async ({ location }) => {
const signer = await invoke("verify_signer");
if (!signer) {
throw redirect({
to: "/landing",
search: {
redirect: location.href,
},
});
}
},
});
function Index() {
return (
<div className="p-2">
<h3>Welcome Home!</h3>
</div>
);
}