diff --git a/src/app/LoginHeaders.ts b/src/app/LoginHeaders.ts index 2a093c8..c40ba40 100644 --- a/src/app/LoginHeaders.ts +++ b/src/app/LoginHeaders.ts @@ -33,9 +33,14 @@ export function getBarData(jwt: string) { const relative = formatDistance(new Date(expirationTimestamp), Date.now(), { addSuffix: true, }); + + const expirationDate = format(new Date(expirationTimestamp), "MM/dd/yyyy"); + return { groups, nickname: preferred_username, expiration: relative, + expirationDate: expirationDate, }; } +} diff --git a/src/app/page.tsx b/src/app/page.tsx index df1d672..a4b2bd3 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -19,5 +19,5 @@ export default function Home() { const { groups, nickname, expiration } = getBarData(jwt); - return ; + return ; } diff --git a/src/components/whoami.tsx b/src/components/whoami.tsx index a0255fd..b316efe 100644 --- a/src/components/whoami.tsx +++ b/src/components/whoami.tsx @@ -34,7 +34,7 @@ export function Whoami({ nickname, expiration, groups }: WhoamiProps) {
Access Token Expiry:{" "} - {expiration} + {expiration} ({expirationDate})