Landing: Enter -> login door, /login deep-link (signin mode), /signup register; onboarding scroll fix
This commit is contained in:
parent
f98fca45d0
commit
27fd68c8df
4 changed files with 18 additions and 5 deletions
|
|
@ -65,7 +65,10 @@ function SignInForm({ onSwitch }: { onSwitch: () => void }): React.ReactElement
|
|||
export default function OnboardingPage(): React.ReactElement {
|
||||
const { status, session, register, adoptToken, logout } = useAuth();
|
||||
const offline = status === "offline";
|
||||
const [mode, setMode] = useState<"register" | "signin">("register");
|
||||
// /login deep-links here in sign-in mode; the default entry is create-account.
|
||||
const [mode, setMode] = useState<"register" | "signin">(
|
||||
typeof window !== "undefined" && window.location.search.includes("mode=signin") ? "signin" : "register",
|
||||
);
|
||||
const [step, setStep] = useState(0);
|
||||
const [name, setName] = useState("");
|
||||
// Collectives opt-in (operator reorder #2): default OFF = solo account.
|
||||
|
|
@ -148,7 +151,7 @@ export default function OnboardingPage(): React.ReactElement {
|
|||
// Signed-in visitors who land here (e.g. from the sidebar) get a way out rather than a second registration form.
|
||||
if (status === "authenticated" && session !== null && step === 0) {
|
||||
return (
|
||||
<div className="flex h-full items-center justify-center p-6">
|
||||
<div className="flex min-h-full items-center justify-center p-6">
|
||||
<Card className="w-[520px] max-w-full p-6">
|
||||
<h2 className="mb-1 text-base font-semibold">You're signed in</h2>
|
||||
<p className="mb-6 text-xs text-text-faint">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue