Implemented the RegisterTab in the Login.jsx
This commit is contained in:
parent
4513ceb200
commit
6cd70b8145
@ -2,21 +2,24 @@ import {Stack, Tab, Tabs} from "@mui/material";
|
||||
import Logo from "@/states/Login/components/Logo";
|
||||
import {useState} from "react";
|
||||
import LoginTab from "@/states/Login/tabs/LoginTab";
|
||||
import RegisterTab from "@/states/Login/tabs/RegisterTab";
|
||||
|
||||
export const Login = () => {
|
||||
const [currentPage, setCurrentPage] = useState(0);
|
||||
|
||||
const [showTabs, setShowTabs] = useState(true);
|
||||
|
||||
return (
|
||||
<Stack justifyContent="center" alignItems="center" sx={{height: {xs: "100%",sm: "100vh"}}} gap={2}>
|
||||
<Logo/>
|
||||
|
||||
<Tabs value={currentPage} onChange={(e, v) => setCurrentPage(v)}>
|
||||
{showTabs && <Tabs value={currentPage} onChange={(e, v) => setCurrentPage(v)}>
|
||||
<Tab label="Anmelden"/>
|
||||
<Tab label="Registrieren"/>
|
||||
</Tabs>
|
||||
</Tabs>}
|
||||
|
||||
{currentPage === 0 && <LoginTab />}
|
||||
{currentPage === 1 && <div>Register</div>}
|
||||
{currentPage === 1 && <RegisterTab setShowTabs={setShowTabs} />}
|
||||
</Stack>
|
||||
)
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user