feat: Add home

This commit is contained in:
Wanjohi
2025-06-12 12:43:52 +03:00
parent 0a1a4cd9b6
commit 88f499ba5e

View File

@@ -9,51 +9,50 @@ import { useAccount, useStorage } from "@nestri/www/providers/account";
export const SteamRoute = ( export const SteamRoute = (
<Route <Route
// component={(props) => { component={(props) => {
// const params = useParams(); const params = useParams();
// const account = useAccount(); const account = useAccount();
// const storage = useStorage(); const storage = useStorage();
// const openauth = useOpenAuth(); const openauth = useOpenAuth();
// const team = createMemo(() => const steam = createMemo(() =>
// account.current.teams.find( account.current.profiles.find(
// (item) => item.id === params.steamID, (item) => item.id === params.steamID,
// ), ),
// ); );
// createEffect(() => { createEffect(() => {
// const t = team(); const t = steam();
// if (!t) return; if (!t) return;
// storage.set("steam", t.id); storage.set("steam", t.id);
// }); });
// createEffect(() => { createEffect(() => {
// const steamID = params.steamID; const steamID = params.steamID;
// for (const item of Object.values(account.all)) { for (const item of Object.values(account.all)) {
// for (const profile of item.profiles) { for (const profile of item.profiles) {
// if (profile.id === steamID && item.id !== openauth.subject!.id) { if (profile.id === steamID && item.id !== openauth.subject!.id) {
// openauth.switch(item.id); openauth.switch(item.id);
// } }
// } }
// } }
// }) })
// return ( return (
// <Switch> <Switch>
// <Match when={!team()}> <Match when={!steam()}>
// {/* TODO: Add a public page for (other) teams */} <NotAllowed header />
// <NotAllowed header /> </Match>
// </Match> <Match when={steam()}>
// <Match when={team()}> <SteamContext.Provider value={() => steam()!}>
// <TeamContext.Provider value={() => team()!}> <ApiProvider>
// <ApiProvider> {props.children}
// {props.children} </ApiProvider>
// </ApiProvider> </SteamContext.Provider>
// </TeamContext.Provider> </Match>
// </Match> </Switch>
// </Switch> )
// ) }}
// }}
> >
<Route path="library" component={LibraryRoute} /> <Route path="library" component={LibraryRoute} />
<Route path="*" component={() => <NotFound header />} /> <Route path="*" component={() => <NotFound header />} />