-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from visakhvjn/18-make-a-login-page
18 make a login page
- Loading branch information
Showing
20 changed files
with
471 additions
and
48 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,3 @@ | ||
import BrainIcon from './brain_ai.svg'; | ||
|
||
export { BrainIcon }; |
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,37 @@ | ||
import React from "react"; | ||
import Header from "../header"; | ||
import { BrainIcon } from "../../assets"; | ||
import Auth0LogoutButton from "../auth0-logout-button"; | ||
import { useNavigate } from "react-router-dom"; | ||
|
||
const AppHeader: React.FC = () => { | ||
const navigate = useNavigate(); | ||
|
||
const onLogout = () => { | ||
localStorage.clear(); | ||
navigate("/"); | ||
}; | ||
|
||
return ( | ||
<Header> | ||
<div className="flex justify-between w-full"> | ||
<div className="flex space-x-2 items-center justify-center"> | ||
<img | ||
onClick={() => navigate("/categories")} | ||
className="border border-black rounded-full p-1 h-10 cursor-pointer" | ||
src={BrainIcon} | ||
/> | ||
<div className="flex flex-col text-left"> | ||
<span className="text-shadow-md font-bold">trivia.ai</span> | ||
<span className="text-xs">Endless Knowledge</span> | ||
</div> | ||
</div> | ||
<div> | ||
<Auth0LogoutButton onLogout={onLogout} /> | ||
</div> | ||
</div> | ||
</Header> | ||
); | ||
}; | ||
|
||
export default AppHeader; |
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
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
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 |
---|---|---|
@@ -1,7 +1,19 @@ | ||
import React from "react"; | ||
import { BrainIcon } from "../../assets"; | ||
|
||
const Logo: React.FC = () => { | ||
return <div></div>; | ||
return ( | ||
<div className="flex flex-col items-center"> | ||
<img className="border border-black rounded-full p-4" src={BrainIcon} /> | ||
<br /> | ||
<div className="flex flex-col"> | ||
<span className="text-shadow-md text-6xl font-bold"> | ||
trivia.ai | ||
</span> | ||
<span>Discover Smart, Fun, Endless Knowledge</span> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Logo; |
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
Oops, something went wrong.