Client key

This commit is contained in:
2026-08-18 18:49:31 +02:00
parent e9fe71784a
commit bb8994bb7e
7 changed files with 47 additions and 24 deletions
+7 -2
View File
@@ -1,23 +1,28 @@
import { useRef } from "react";
import { useReducer, useRef } from "react";
import Enclave from "@/app/app";
import ServerList from "./components/view/serverList";
import { NewProfilePage } from "./components/view/NewProfileView";
export default function App() {
const appRef = useRef<Enclave | null>(null);
const [, forceRender] = useReducer((x) => x + 1, 0);
if (!appRef.current) {
appRef.current = new Enclave();
appRef.current.forceRender = forceRender;
appRef.current
.init()
.then(() => {
console.log("Encalve initialized");
forceRender();
})
.catch(console.error);
}
return (
<main className="size-screen">
{!appRef.current.accounts ||
{appRef.current?.accounts &&
appRef.current.accounts.accounts.length === 0 ? (
<NewProfilePage appRef={appRef} />
) : (