refactor: bring back border to the login related buttons
This commit is contained in:
parent
8f90e61379
commit
2b88963e64
1 changed files with 10 additions and 7 deletions
|
|
@ -37,41 +37,44 @@ export default function Header(): JSX.Element {
|
||||||
navigate("/");
|
navigate("/");
|
||||||
}}
|
}}
|
||||||
variant="outline"
|
variant="outline"
|
||||||
className=""
|
className=" text-sm font-medium text-muted-foreground transition-colors hover:text-primary cursor-pointer "
|
||||||
>
|
>
|
||||||
Main page
|
Main page
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{autoLogin === false && (
|
{autoLogin === false && (
|
||||||
<a
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
logout();
|
logout();
|
||||||
navigate("/login");
|
navigate("/login");
|
||||||
}}
|
}}
|
||||||
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"
|
||||||
|
variant="outline"
|
||||||
>
|
>
|
||||||
Sign out
|
Sign out
|
||||||
</a>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{location.pathname === "/admin" && (
|
{location.pathname === "/admin" && (
|
||||||
<a
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
navigate("/");
|
navigate("/");
|
||||||
}}
|
}}
|
||||||
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"
|
||||||
>
|
>
|
||||||
Home
|
Home
|
||||||
</a>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{isAdmin && !autoLogin && location.pathname !== "/admin" && (
|
{isAdmin && !autoLogin && location.pathname !== "/admin" && (
|
||||||
<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"
|
||||||
onClick={() => navigate("/admin")}
|
onClick={() => navigate("/admin")}
|
||||||
|
variant="outline"
|
||||||
>
|
>
|
||||||
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