-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create the home page and update the sign in Page
- Loading branch information
Olasunkanmi Oyinlola
authored and
Olasunkanmi Oyinlola
committed
Feb 16, 2024
1 parent
ef5161a
commit 9731fe2
Showing
5 changed files
with
148 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { CSSProperties } from "react"; | ||
import { Button } from "react-bootstrap"; | ||
import { useNavigate } from "react-router-dom"; | ||
|
||
export const AuthModal = () => { | ||
const navigate = useNavigate(); | ||
const handleSignIn = () => { | ||
navigate("/login"); | ||
}; | ||
const buttonStyle: CSSProperties = { | ||
width: "100%", | ||
margin: "auto", | ||
}; | ||
return ( | ||
<div> | ||
<div style={{ marginBottom: "15px" }}> | ||
<Button onClick={handleSignIn} variant="dark" className="w-10" size="lg" style={buttonStyle}> | ||
Sign In | ||
</Button> | ||
</div> | ||
<div> | ||
<Button variant="outline-dark " className="w-10" size="sm" style={buttonStyle}> | ||
Continue as a Guest | ||
</Button> | ||
</div> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React, { CSSProperties } from "react"; | ||
import { Tabs, Tab } from "react-bootstrap"; | ||
|
||
interface TabProps { | ||
title: string; | ||
children: React.ReactNode; | ||
} | ||
|
||
interface TabComponentProps { | ||
tabs: TabProps[]; | ||
style?: CSSProperties; | ||
} | ||
|
||
export const TabComponent = ({ tabs, style }: Readonly<TabComponentProps>) => { | ||
const renderTabs = () => { | ||
return tabs.map(({ title, children }) => ( | ||
<Tab style={style} key={title} eventKey={title} title={title}> | ||
{children} | ||
</Tab> | ||
)); | ||
}; | ||
|
||
return ( | ||
<Tabs defaultActiveKey={"Email"} className="mb-3"> | ||
{renderTabs()} | ||
</Tabs> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters