Refactor: Remove duplicate login button and bring back button borders back
This commit is contained in:
parent
4739372e20
commit
158ef9a9ea
1 changed files with 6 additions and 15 deletions
|
|
@ -32,7 +32,8 @@ export default function Header(): JSX.Element {
|
||||||
<MenuBar flows={flows} tabId={tabId} />
|
<MenuBar flows={flows} tabId={tabId} />
|
||||||
)}
|
)}
|
||||||
{!autoLogin && location.pathname !== `/flow/${tabId}` && (
|
{!autoLogin && location.pathname !== `/flow/${tabId}` && (
|
||||||
<a
|
<Button
|
||||||
|
variant="outline"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
logout();
|
logout();
|
||||||
navigate("/login");
|
navigate("/login");
|
||||||
|
|
@ -40,30 +41,20 @@ export default function Header(): JSX.Element {
|
||||||
className="text-sm font-medium text-muted-foreground transition-colors hover:text-primary cursor-pointer mx-5"
|
className="text-sm font-medium text-muted-foreground transition-colors hover:text-primary cursor-pointer mx-5"
|
||||||
>
|
>
|
||||||
Sign out
|
Sign out
|
||||||
</a>
|
</Button>
|
||||||
)}
|
|
||||||
|
|
||||||
{location.pathname === "/admin" && (
|
|
||||||
<a
|
|
||||||
onClick={() => {
|
|
||||||
navigate("/");
|
|
||||||
}}
|
|
||||||
className="text-sm font-medium text-muted-foreground transition-colors hover:text-primary cursor-pointer"
|
|
||||||
>
|
|
||||||
Home
|
|
||||||
</a>
|
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{isAdmin &&
|
{isAdmin &&
|
||||||
!autoLogin &&
|
!autoLogin &&
|
||||||
location.pathname !== "/admin" &&
|
location.pathname !== "/admin" &&
|
||||||
location.pathname !== `/flow/${tabId}` && (
|
location.pathname !== `/flow/${tabId}` && (
|
||||||
<a
|
<Button
|
||||||
className="text-sm font-medium text-muted-foreground transition-colors hover:text-primary cursor-pointer"
|
className="text-sm font-medium text-muted-foreground transition-colors hover:text-primary cursor-pointer"
|
||||||
|
variant="outline"
|
||||||
onClick={() => navigate("/admin")}
|
onClick={() => navigate("/admin")}
|
||||||
>
|
>
|
||||||
Admin page
|
Admin page
|
||||||
</a>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="round-button-div">
|
<div className="round-button-div">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue