From 07819844d5ef7e323fd956eacfedecb2f4f4bb80 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Fri, 17 Nov 2023 15:16:23 +0700 Subject: Update result feature --- src/modules/profile-card/index.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/modules/profile-card') diff --git a/src/modules/profile-card/index.tsx b/src/modules/profile-card/index.tsx index 08c4478..881561d 100644 --- a/src/modules/profile-card/index.tsx +++ b/src/modules/profile-card/index.tsx @@ -1,13 +1,11 @@ -import { Credential } from "@/common/types/auth" import { Avatar, AvatarIcon, Card, CardBody } from '@nextui-org/react'; -import { teamAliases } from '@/common/constants/team'; +import { TEAM_ALIASES } from '@/common/constants/team'; import styles from "./profile-card.module.css" import Dropdown from './components/Dropdown'; -import { cookies } from 'next/headers'; +import getServerCredential from '@/common/libs/getServerCredential'; const ProfileCard = () => { - const credentialStr = cookies().get('credential')?.value - const credential: Credential | null = credentialStr ? JSON.parse(credentialStr) : null + const credential = getServerCredential() return credential && ( @@ -21,7 +19,7 @@ const ProfileCard = () => { · - Tim {teamAliases[credential.team].name} + Tim {TEAM_ALIASES[credential.team].name} -- cgit v1.2.3