Skip to content

Commit

Permalink
Fix error in build
Browse files Browse the repository at this point in the history
  • Loading branch information
barbarah committed Dec 8, 2023
1 parent c396894 commit 4077e9f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion apps/researcher/src/app/[locale]/debug/backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ export async function backendLogAction() {
const {getToken, sessionId, session, userId} = await auth();
const token = await getToken();
const tokenDecoded = token ? jwtDecode(token) : null;
const date = dateTimeFormat.format(tokenDecoded?.exp * 1000);
const date = tokenDecoded?.exp
? dateTimeFormat.format(tokenDecoded?.exp * 1000)
: null;
console.log('DEBUG BUTTON CLICKED: BACKEND', {
date,
token,
Expand Down
4 changes: 3 additions & 1 deletion apps/researcher/src/app/[locale]/debug/frontend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ export function DebugButton() {
const onClick = async () => {
const token = await getToken();
const tokenDecoded = token ? jwtDecode(token) : null;
const date = dateTimeFormat.format(tokenDecoded?.exp * 1000);
const date = tokenDecoded?.exp
? dateTimeFormat.format(tokenDecoded?.exp * 1000)
: null;
console.log('DEBUG BUTTON CLICKED: FRONTEND', {
date,
isSignedIn,
Expand Down

2 comments on commit 4077e9f

@vercel
Copy link

@vercel vercel bot commented on 4077e9f Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 4077e9f Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.