GuestOnly
Inverse of ProtectedRoute — render children only when NOT authenticated. Useful for /login and /register pages that should redirect away when an authenticated user lands on them.
Usage
import { GuestOnly } from '@rw3iss/auth-client/preact/atoms';
<GuestOnly children={<></>}/>Props
| Name | Type | Description |
|---|---|---|
children | ComponentChildren | (required) |
fallback | ComponentChildren | Rendered when the user is authenticated. |
loading | ComponentChildren | |
client | AuthClient |