Revert "fix: static pages changes prelaunch"

This reverts commit f0890f6cf9.
This commit is contained in:
Michael Zetterberg
2024-08-26 16:06:26 +02:00
parent 2e99525c94
commit 6d0e01d4e4
3 changed files with 23 additions and 24 deletions

View File

@@ -1,19 +1,19 @@
// import { logout } from "@/constants/routes/handleAuth"
// import { serverClient } from "@/lib/trpc/server"
import { logout } from "@/constants/routes/handleAuth"
import { serverClient } from "@/lib/trpc/server"
// import Link from "@/components/TempDesignSystem/Link"
// import { getIntl } from "@/i18n"
// import { getLang } from "@/i18n/serverContext"
import Link from "@/components/TempDesignSystem/Link"
import { getIntl } from "@/i18n"
import { getLang } from "@/i18n/serverContext"
// import LoginButton from "../LoginButton"
import LoginButton from "../LoginButton"
import styles from "./topMenu.module.css"
import type { TopMenuProps } from "@/types/components/current/header/topMenu"
// function capitalize(str: string) {
// return str.charAt(0).toUpperCase().toUpperCase() + str.slice(1).toLowerCase()
// }
function capitalize(str: string) {
return str.charAt(0).toUpperCase().toUpperCase() + str.slice(1).toLowerCase()
}
export default async function TopMenu({
frontpageLinkText,
@@ -21,8 +21,8 @@ export default async function TopMenu({
links,
languageSwitcher,
}: TopMenuProps) {
// const { formatMessage } = await getIntl()
// const user = await serverClient().user.name()
const { formatMessage } = await getIntl()
const user = await serverClient().user.name()
return (
<div className={styles.topMenu}>
<div className={styles.container}>
@@ -42,7 +42,7 @@ export default async function TopMenu({
</a>
</li>
))}
{/* <li className={styles.sessionContainer}>
<li className={styles.sessionContainer}>
{user ? (
<>
{user ? (
@@ -72,7 +72,7 @@ export default async function TopMenu({
{formatMessage({ id: "Log in" })}
</LoginButton>
)}
</li> */}
</li>
</ul>
</div>
</div>