feat: new "safe" procedure without unauth throwing
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { logout } from "@/constants/routes/handleAuth"
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import { auth } from "@/auth"
|
||||
import Link from "@/components/TempDesignSystem/Link"
|
||||
import { getIntl } from "@/i18n"
|
||||
|
||||
@@ -23,9 +22,7 @@ export default async function TopMenu({
|
||||
lang,
|
||||
}: TopMenuProps) {
|
||||
const { formatMessage } = await getIntl()
|
||||
const session = await auth()
|
||||
const user = session ? await serverClient().user.get() : null
|
||||
|
||||
const user = await serverClient().user.name()
|
||||
return (
|
||||
<div className={styles.topMenu}>
|
||||
<div className={styles.container}>
|
||||
@@ -46,7 +43,7 @@ export default async function TopMenu({
|
||||
</li>
|
||||
))}
|
||||
<li className={styles.sessionContainer}>
|
||||
{session ? (
|
||||
{user ? (
|
||||
<>
|
||||
{user ? (
|
||||
<Link
|
||||
|
||||
Reference in New Issue
Block a user