Sign in is the default: the landing names the account, and an admin lands on /admin
This commit is contained in:
@@ -290,10 +290,13 @@ export function Workspace() {
|
||||
// Recipes made in this session, guest ones included. A guest's copy lives
|
||||
// here and nowhere else, so reloading the page is what deletes it.
|
||||
const [created, setCreated] = useState<Recipe[]>([]);
|
||||
// null = closed. /app?auth=1 opens the studio's dialog straight on the sign-up
|
||||
// tab; the landing page runs the same dialog in place instead of linking here.
|
||||
const [authMode, setAuthMode] = useState<'login' | 'signup' | null>(() =>
|
||||
(new URLSearchParams(window.location.search).has('auth') ? 'signup' : null));
|
||||
// null = closed. /app?auth=1 opens the studio's dialog straight on the sign-in
|
||||
// tab (sign-in is the default; ?auth=signup asks for the other one); the
|
||||
// landing page runs the same dialog in place instead of linking here.
|
||||
const [authMode, setAuthMode] = useState<'login' | 'signup' | null>(() => {
|
||||
const asked = new URLSearchParams(window.location.search).get('auth');
|
||||
return asked ? (asked === 'signup' ? 'signup' : 'login') : null;
|
||||
});
|
||||
|
||||
const renderToken = useRef(0);
|
||||
// Which previewMax the bytes in previewBytes were made at, so the upgrade
|
||||
|
||||
Reference in New Issue
Block a user