From d6c92e6d15110a33730307dec7e46fa09fd7d6d2 Mon Sep 17 00:00:00 2001 From: hunterckx <118154470+hunterckx@users.noreply.github.com> Date: Mon, 4 Nov 2024 13:48:48 -0800 Subject: [PATCH] refactor: rename DONE authentication status to SETTLED (#178) --- .../Authentication/components/SessionController/utils.ts | 4 ++-- src/providers/authentication/authentication/dispatch.ts | 2 +- src/providers/authentication/authentication/types.ts | 2 +- src/providers/googleSignInAuthentication/contants.ts | 2 +- src/providers/googleSignInAuthentication/service/service.ts | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/Authentication/components/SessionController/utils.ts b/src/components/Authentication/components/SessionController/utils.ts index 28ebcf91..2743bec0 100644 --- a/src/components/Authentication/components/SessionController/utils.ts +++ b/src/components/Authentication/components/SessionController/utils.ts @@ -47,10 +47,10 @@ function mapAuthenticationStatus( ): AUTHENTICATION_STATUS { switch (status) { case "authenticated": - return AUTHENTICATION_STATUS.DONE; + return AUTHENTICATION_STATUS.SETTLED; case "loading": return AUTHENTICATION_STATUS.PENDING; default: - return AUTHENTICATION_STATUS.DONE; + return AUTHENTICATION_STATUS.SETTLED; } } diff --git a/src/providers/authentication/authentication/dispatch.ts b/src/providers/authentication/authentication/dispatch.ts index 53acb678..197d5363 100644 --- a/src/providers/authentication/authentication/dispatch.ts +++ b/src/providers/authentication/authentication/dispatch.ts @@ -13,7 +13,7 @@ import { */ export function authenticationComplete(): UpdateAuthenticationAction { return { - payload: { status: AUTHENTICATION_STATUS.DONE }, + payload: { status: AUTHENTICATION_STATUS.SETTLED }, type: AuthenticationActionKind.UpdateAuthentication, }; } diff --git a/src/providers/authentication/authentication/types.ts b/src/providers/authentication/authentication/types.ts index 22732dee..d9562a97 100644 --- a/src/providers/authentication/authentication/types.ts +++ b/src/providers/authentication/authentication/types.ts @@ -1,8 +1,8 @@ import { Dispatch } from "react"; export enum AUTHENTICATION_STATUS { - DONE = "DONE", PENDING = "PENDING", + SETTLED = "SETTLED", } export type AuthenticationAction = diff --git a/src/providers/googleSignInAuthentication/contants.ts b/src/providers/googleSignInAuthentication/contants.ts index 86695a56..2b565cd6 100644 --- a/src/providers/googleSignInAuthentication/contants.ts +++ b/src/providers/googleSignInAuthentication/contants.ts @@ -13,5 +13,5 @@ export const AUTH_STATE: AuthState = { export const AUTHENTICATION_STATE: AuthenticationState = { ...DEFAULT_AUTHENTICATION_STATE, - status: AUTHENTICATION_STATUS.DONE, + status: AUTHENTICATION_STATUS.SETTLED, }; diff --git a/src/providers/googleSignInAuthentication/service/service.ts b/src/providers/googleSignInAuthentication/service/service.ts index 15195b30..9592644f 100644 --- a/src/providers/googleSignInAuthentication/service/service.ts +++ b/src/providers/googleSignInAuthentication/service/service.ts @@ -34,7 +34,7 @@ export const service = { dispatch.authenticationDispatch?.( updateAuthentication({ profile: undefined, - status: AUTHENTICATION_STATUS.DONE, + status: AUTHENTICATION_STATUS.SETTLED, }) ), onSuccess: (r: GoogleProfile) =>