More memoized requests

This commit is contained in:
Linus Flood
2024-10-28 11:20:59 +01:00
parent f5798562cc
commit 5e8efb4a27
8 changed files with 44 additions and 24 deletions

View File

@@ -3,10 +3,10 @@ import { getName } from "@/lib/trpc/memoizedRequests"
import MyPagesSidebar from "@/components/MyPages/Sidebar"
export default async function MyPagesNavigation() {
const username = await getName()
const user = await getName()
// Check if we have user, that means we are logged in andt the My Pages menu can show.
if (!username) {
if (!user) {
return null
}
return <MyPagesSidebar />