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 Logo from "@/states/Login/components/Logo";
|
||||||
import {useState} from "react";
|
import {useState} from "react";
|
||||||
import LoginTab from "@/states/Login/tabs/LoginTab";
|
import LoginTab from "@/states/Login/tabs/LoginTab";
|
||||||
|
import RegisterTab from "@/states/Login/tabs/RegisterTab";
|
||||||
|
|
||||||
export const Login = () => {
|
export const Login = () => {
|
||||||
const [currentPage, setCurrentPage] = useState(0);
|
const [currentPage, setCurrentPage] = useState(0);
|
||||||
|
|
||||||
|
const [showTabs, setShowTabs] = useState(true);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack justifyContent="center" alignItems="center" sx={{height: {xs: "100%",sm: "100vh"}}} gap={2}>
|
<Stack justifyContent="center" alignItems="center" sx={{height: {xs: "100%",sm: "100vh"}}} gap={2}>
|
||||||
<Logo/>
|
<Logo/>
|
||||||
|
|
||||||
<Tabs value={currentPage} onChange={(e, v) => setCurrentPage(v)}>
|
{showTabs && <Tabs value={currentPage} onChange={(e, v) => setCurrentPage(v)}>
|
||||||
<Tab label="Anmelden"/>
|
<Tab label="Anmelden"/>
|
||||||
<Tab label="Registrieren"/>
|
<Tab label="Registrieren"/>
|
||||||
</Tabs>
|
</Tabs>}
|
||||||
|
|
||||||
{currentPage === 0 && <LoginTab />}
|
{currentPage === 0 && <LoginTab />}
|
||||||
{currentPage === 1 && <div>Register</div>}
|
{currentPage === 1 && <RegisterTab setShowTabs={setShowTabs} />}
|
||||||
</Stack>
|
</Stack>
|
||||||
)
|
)
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user