feat: add policy pages
This commit is contained in:
@@ -8,12 +8,20 @@
|
||||
|
||||
import { useState } from "react";
|
||||
import { useAuth } from "@/components/auth/auth-provider";
|
||||
import { OAuthButtons } from "@/components/auth/oauth-buttons";
|
||||
import { AuthError } from "@/lib/auth";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Label } from "@/components/ui/label";
|
||||
|
||||
export function SignUpForm({ onSuccess }: { onSuccess?: () => void }) {
|
||||
export function SignUpForm({
|
||||
onSuccess,
|
||||
oauthNext,
|
||||
}: {
|
||||
onSuccess?: () => void;
|
||||
/** Post-OAuth redirect path on the frontend. */
|
||||
oauthNext?: string;
|
||||
}) {
|
||||
const { signUp } = useAuth();
|
||||
const [name, setName] = useState("");
|
||||
const [email, setEmail] = useState("");
|
||||
@@ -36,7 +44,9 @@ export function SignUpForm({ onSuccess }: { onSuccess?: () => void }) {
|
||||
}
|
||||
|
||||
return (
|
||||
<form onSubmit={onSubmit} className="space-y-5">
|
||||
<div className="space-y-5">
|
||||
<OAuthButtons next={oauthNext} />
|
||||
<form onSubmit={onSubmit} className="space-y-5">
|
||||
<div className="space-y-1.5">
|
||||
<Label htmlFor="signup-name">Name</Label>
|
||||
<Input
|
||||
@@ -76,6 +86,7 @@ export function SignUpForm({ onSuccess }: { onSuccess?: () => void }) {
|
||||
<Button type="submit" disabled={submitting} className="w-full h-11 text-base">
|
||||
{submitting ? "Creating account…" : "Sign up"}
|
||||
</Button>
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user