-
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.
- Loading branch information
1 parent
fabfa31
commit 7378bf3
Showing
12 changed files
with
195 additions
and
122 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,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
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.