Mapo Doofus
Mapo Doofus
SSolidJS
Created by Mapo Doofus on 10/7/2024 in #support
Auth in layout?
Thanks, that's an interesting approach. Can you reflect in the url and history that they've moved to a different page like /auth/login if you wanted to?
10 replies
SSolidJS
Created by Mapo Doofus on 10/7/2024 in #support
Auth in layout?
export default function MainLayout(props: { children: JSX.Element }) {
createAsync(() => authOrRedirect(), { name: "authProtect" });

return (
<div class="h-full flex flex-col main-layout">
<Title>Laserfeed</Title>
<Header />
<main class="flex-grow max-w-screen-lg mx-auto w-full">
{props.children}
</main>
</div>
);
}
export default function MainLayout(props: { children: JSX.Element }) {
createAsync(() => authOrRedirect(), { name: "authProtect" });

return (
<div class="h-full flex flex-col main-layout">
<Title>Laserfeed</Title>
<Header />
<main class="flex-grow max-w-screen-lg mx-auto w-full">
{props.children}
</main>
</div>
);
}
10 replies
SSolidJS
Created by Mapo Doofus on 10/7/2024 in #support
Auth in layout?
No description
10 replies
TtRPC
Created by haardik | LearnWeb3 on 10/3/2023 in #❓-help
tRPC Client within Next.js but with external standalone server?
It’s been a minute since I used trpc but things seem to be the same. Yes you’ll use @trpc/next. I have an old repo with a fastify server here if it helps https://github.com/maybemaby/fastify-trpc-next.
3 replies