From 0eba18784ecea623021255aa9c7f8854c7586627 Mon Sep 17 00:00:00 2001 From: maxime Date: Thu, 21 Mar 2024 21:53:14 +0100 Subject: [PATCH] use new API's date standard --- src/Fetcher.ts | 2 +- src/api/session.ts | 2 +- src/pages/HomePage.tsx | 2 +- src/pages/LoginPage.tsx | 2 +- src/pages/RegisterPage.tsx | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Fetcher.ts b/src/Fetcher.ts index a44022f..0311121 100644 --- a/src/Fetcher.ts +++ b/src/Fetcher.ts @@ -58,7 +58,7 @@ async function handleResponse( } const nextToken = response.headers.get("Next-Authorization")! - const expirationDate = Date.parse( + const expirationDate = new Date( response.headers.get("Next-Authorization-Expiration-Date")!, ) if (nextToken && expirationDate) diff --git a/src/api/session.ts b/src/api/session.ts index a061228..3eb3035 100644 --- a/src/api/session.ts +++ b/src/api/session.ts @@ -6,7 +6,7 @@ export interface Session { export interface Authentication { token: string - expirationDate: number + expirationDate: Date } const SESSION_KEY = "session" diff --git a/src/pages/HomePage.tsx b/src/pages/HomePage.tsx index 38dd127..69968da 100644 --- a/src/pages/HomePage.tsx +++ b/src/pages/HomePage.tsx @@ -232,7 +232,7 @@ function Tactic({ lastTactics }: { lastTactics: Tactic[] }) { return (
-

Mes dernières stratégies

+

Mes dernières tactiques