mirror of
https://github.com/shadcn-ui/taxonomy
synced 2026-05-24 09:48:32 +00:00
Fixed: Register page shows Button with Sign In instead of Sign Up
This commit is contained in:
parent
651f984e52
commit
d45ab66865
2 changed files with 12 additions and 4 deletions
|
|
@ -34,7 +34,7 @@ export default function RegisterPage() {
|
|||
Enter your email below to create your account
|
||||
</p>
|
||||
</div>
|
||||
<UserAuthForm />
|
||||
<UserAuthForm option="register" />
|
||||
<p className="px-8 text-center text-sm text-muted-foreground">
|
||||
By clicking continue, you agree to our{" "}
|
||||
<Link
|
||||
|
|
|
|||
|
|
@ -15,11 +15,17 @@ import { Label } from "@/components/ui/label"
|
|||
import { toast } from "@/components/ui/use-toast"
|
||||
import { Icons } from "@/components/icons"
|
||||
|
||||
interface UserAuthFormProps extends React.HTMLAttributes<HTMLDivElement> {}
|
||||
interface UserAuthFormProps extends React.HTMLAttributes<HTMLDivElement> {
|
||||
option?: string
|
||||
}
|
||||
|
||||
type FormData = z.infer<typeof userAuthSchema>
|
||||
|
||||
export function UserAuthForm({ className, ...props }: UserAuthFormProps) {
|
||||
export function UserAuthForm({
|
||||
className,
|
||||
option,
|
||||
...props
|
||||
}: UserAuthFormProps) {
|
||||
const {
|
||||
register,
|
||||
handleSubmit,
|
||||
|
|
@ -84,7 +90,9 @@ export function UserAuthForm({ className, ...props }: UserAuthFormProps) {
|
|||
{isLoading && (
|
||||
<Icons.spinner className="mr-2 h-4 w-4 animate-spin" />
|
||||
)}
|
||||
Sign In with Email
|
||||
{option === "register"
|
||||
? "Sign Up with Email"
|
||||
: "Sign In with Email"}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
|||
Loading…
Reference in a new issue