diff --git a/components/AuthSubmitButton.tsx b/components/AuthSubmitButton.tsx deleted file mode 100644 index 434d0af..0000000 --- a/components/AuthSubmitButton.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { IconProp } from "@fortawesome/fontawesome-svg-core"; - -type Props = { - onClick?: Function; - icon?: IconProp; - label: string; - loading: boolean; - className?: string; -}; - -export default function AuthSubmitButton({ - onClick, - icon, - label, - loading, - className, -}: Props) { - return ( - - ); -} diff --git a/components/SubmitButton.tsx b/components/SubmitButton.tsx index 8a06eac..6ee0a78 100644 --- a/components/SubmitButton.tsx +++ b/components/SubmitButton.tsx @@ -2,11 +2,12 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { IconProp } from "@fortawesome/fontawesome-svg-core"; type Props = { - onClick: Function; + onClick?: Function; icon?: IconProp; label: string; loading: boolean; className?: string; + type?: "button" | "submit" | "reset" | undefined; }; export default function SubmitButton({ @@ -15,20 +16,22 @@ export default function SubmitButton({ label, loading, className, + type, }: Props) { return ( -
{label}
-{label}
+ ); } diff --git a/pages/choose-username.tsx b/pages/choose-username.tsx index 75d6aa0..1b4d9be 100644 --- a/pages/choose-username.tsx +++ b/pages/choose-username.tsx @@ -1,6 +1,6 @@ import SubmitButton from "@/components/SubmitButton"; import { signOut } from "next-auth/react"; -import { useState } from "react"; +import { FormEvent, useState } from "react"; import { toast } from "react-hot-toast"; import { useSession } from "next-auth/react"; import useAccountStore from "@/store/account"; @@ -15,7 +15,9 @@ export default function ChooseUsername() { const { updateAccount, account } = useAccountStore(); - async function submitUsername() { + async function submitUsername(event: FormEvent- Choose a Username (Last step) -
- -- Username +
- Password Recovery -
-- Enter your Email so we can send you a link to recover your account. - Make sure to change your password in the profile settings - afterwards. -
-- You wont get logged in if you haven't created an account yet. -
-- Email +
New here?
++ New here? +
- Enter your details -
-- Display Name +
+ Enter your details
- -- Username + Display Name
- Email + {emailEnabled ? undefined : ( +
+ Username +
+ ++ Email +
+ ++ Password
- Password -
- -- Confirm Password -
- -- By signing up, you agree to our{" "} - - Terms of Service - {" "} - and{" "} - - Privacy Policy - - . -
-- Need help?{" "} - - Get in touch - - . +
+ Confirm Password
+ +- Already have an account? -
- - Login - + {process.env.NEXT_PUBLIC_STRIPE_IS_ACTIVE ? ( ++ By signing up, you agree to our{" "} + + Terms of Service + {" "} + and{" "} + + Privacy Policy + + . +
++ Need help?{" "} + + Get in touch + + . +
++ Already have an account? +
+ + Login + +