From 76d05af0bb5f985915efde6a079ca9cc97510552 Mon Sep 17 00:00:00 2001 From: M1000fr Date: Fri, 13 Dec 2024 14:42:34 +0100 Subject: [PATCH] Refactor: Update moment locale to French in axios.ts and authOptions.ts --- src/app/lib/axios.ts | 2 ++ src/authOptions.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/app/lib/axios.ts b/src/app/lib/axios.ts index 0441b20..39346df 100644 --- a/src/app/lib/axios.ts +++ b/src/app/lib/axios.ts @@ -2,6 +2,8 @@ import axios from "axios"; import moment, { Moment } from "moment"; import { getSession } from "next-auth/react"; +moment.locale("fr"); + let cachedAccessToken: string | null = null; let tokenExpirationAt: Moment | null = null; diff --git a/src/authOptions.ts b/src/authOptions.ts index 0838799..702670a 100644 --- a/src/authOptions.ts +++ b/src/authOptions.ts @@ -3,6 +3,8 @@ import moment from "moment"; import { AuthOptions, Session } from "next-auth"; import { JWT } from "next-auth/jwt"; +moment.locale("fr"); + export const authOptions: AuthOptions = { providers: [ {