summaryrefslogtreecommitdiff
path: root/src/modules/profile-card
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-11-17 15:16:23 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-11-17 15:16:23 +0700
commit07819844d5ef7e323fd956eacfedecb2f4f4bb80 (patch)
treed83ba8c6ff7f47f568889ff8371ee9d9918ed166 /src/modules/profile-card
parent10ce1ad59969576244ba786d7d17da2da3fe6f61 (diff)
Update result feature
Diffstat (limited to 'src/modules/profile-card')
-rw-r--r--src/modules/profile-card/index.tsx10
1 files changed, 4 insertions, 6 deletions
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 && (
<Card shadow='sm'>
@@ -21,7 +19,7 @@ const ProfileCard = () => {
</span>
&#183;
<span>
- Tim {teamAliases[credential.team].name}
+ Tim {TEAM_ALIASES[credential.team].name}
</span>
</div>
</div>