mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-07 03:13:30 +00:00
25fa1f0974
* feedback popover with new api * allow unauthed feedback * add login information * allow no auth * fix hooks * remove emoji on reset * show cancel on left of login button
11 lines
322 B
TypeScript
11 lines
322 B
TypeScript
import { PropsWithChildren, ReactNode } from 'react';
|
|
import { auth } from '@sd/client';
|
|
|
|
export function AuthCheck({ fallback, children }: PropsWithChildren<{ fallback?: ReactNode }>) {
|
|
const authState = auth.useStateSnapshot();
|
|
|
|
if (authState.status !== 'loggedIn') return <>{fallback}</>;
|
|
|
|
return <>{children}</>;
|
|
}
|