Merged in feat/seamless-logout (pull request #194)

feat(WEB-207): Seamless logout

Approved-by: Michael Zetterberg
This commit is contained in:
Matilda Landström
2024-05-23 12:54:44 +00:00
committed by Michael Zetterberg
10 changed files with 146 additions and 16 deletions
+5 -2
View File
@@ -1,6 +1,7 @@
import { Fragment } from "react"
import { LogOut } from "react-feather"
import { logout } from "@/constants/routes/handleAuth"
import { serverClient } from "@/lib/trpc/server"
import Link from "@/components/TempDesignSystem/Link"
@@ -8,7 +9,9 @@ import Title from "@/components/Title"
import styles from "./sidebar.module.css"
export default async function Sidebar() {
import { LangParams } from "@/types/params"
export default async function Sidebar({ lang }: LangParams) {
const navigation = await serverClient().contentstack.myPages.navigation.get()
return (
@@ -41,7 +44,7 @@ export default async function Sidebar() {
</Fragment>
))}
<Link href="/api/web/auth/signout" variant="sidebar">
<Link href={logout[lang]} variant="sidebar">
Log out <LogOut height={16} width={16} />
</Link>
</nav>