fix: add login/logout buttons
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { login, logout } from "@/constants/routes/handleAuth"
|
||||
|
||||
import { auth } from "@/auth"
|
||||
|
||||
import styles from "./topMenu.module.css"
|
||||
@@ -32,11 +34,11 @@ export default async function TopMenu({
|
||||
))}
|
||||
<li className={styles.loginContainer}>
|
||||
{session ? (
|
||||
<a href={`${lang}/logout`} className={styles.loginLink}>
|
||||
<a href={logout[lang]} className={styles.loginLink}>
|
||||
Log out
|
||||
</a>
|
||||
) : (
|
||||
<a href={`${lang}/login`} className={styles.loginLink}>
|
||||
<a href={login[lang]} className={styles.loginLink}>
|
||||
Log in
|
||||
</a>
|
||||
)}
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
.list {
|
||||
display: flex;
|
||||
list-style: none;
|
||||
line-height: 22.4px;
|
||||
}
|
||||
|
||||
.link {
|
||||
@@ -71,11 +72,27 @@
|
||||
.loginContainer {
|
||||
margin-left: 10px;
|
||||
background-color: #f3f2f1;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.loginLink {
|
||||
padding-left: 30px;
|
||||
padding-right: 30px;
|
||||
color: #000;
|
||||
font-family:
|
||||
Helvetica Neue,
|
||||
Helvetica,
|
||||
Arial,
|
||||
sans-serif;
|
||||
font-size: 13px;
|
||||
font-weight: 400;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-rendering: optimizeLegibility;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user