chore: added name in token decode return

feat/preact-migrate
Arik Chakma 2 years ago
parent f354130f35
commit 5cdc443261
  1. 2
      src/components/Login/account-nav.tsx
  2. 1
      src/lib/utils.ts

@ -21,7 +21,7 @@ export default function AccountNavigation() {
return (
<div>
{isAuthenticated ? (
<div>Authenticated: {user?.email}</div>
<div>Authenticated: {user?.name}</div>
) : (
<div>Not Authenticated</div>
)}

@ -4,6 +4,7 @@ export const TOKEN_COOKIE_NAME = '__timefyi_jt__';
export type TokenPayload = {
id: string;
email: string;
name: string;
};
export function decodeToken(token: string): TokenPayload {

Loading…
Cancel
Save