mirror of
https://github.com/bubblecup-12/VogelSocialMedia.git
synced 2025-07-08 13:38:47 +00:00
added react router and routes to login and signup
This commit is contained in:
parent
aab893e890
commit
cb5e9b7e98
4 changed files with 46 additions and 7 deletions
|
@ -8,17 +8,17 @@ type FormData = {
|
|||
password: string;
|
||||
};
|
||||
|
||||
function LoginAndSignUpPage() {
|
||||
function LoginAndSignUpPage({ signupProp }: { signupProp: boolean }) {
|
||||
const [signup, setSignup] = useState<boolean>(signupProp);
|
||||
const [errorMessages, setErrorMessages] = useState<{
|
||||
error: String;
|
||||
details: { message: string }[];
|
||||
}>();
|
||||
const toggleLogin = (event: React.MouseEvent<HTMLElement>) => {
|
||||
event.preventDefault();
|
||||
setErrorMessages(undefined);
|
||||
setSignup(!signup);
|
||||
};
|
||||
const [signup, setSignup] = useState<boolean>(false);
|
||||
const [errorMessages, setErrorMessages] = useState<{
|
||||
error: String;
|
||||
details: { message: string }[];
|
||||
}>();
|
||||
const [formData, setFormData] = useState<FormData>({
|
||||
username: "",
|
||||
email: "",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue