Skip to content

Commit

Permalink
refactor: rename DONE authentication status to SETTLED (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterckx committed Nov 4, 2024
1 parent 2199c17 commit d6c92e6
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
2 changes: 1 addition & 1 deletion src/providers/authentication/authentication/dispatch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
*/
export function authenticationComplete(): UpdateAuthenticationAction {
return {
payload: { status: AUTHENTICATION_STATUS.DONE },
payload: { status: AUTHENTICATION_STATUS.SETTLED },
type: AuthenticationActionKind.UpdateAuthentication,
};
}
Expand Down
2 changes: 1 addition & 1 deletion src/providers/authentication/authentication/types.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Dispatch } from "react";

export enum AUTHENTICATION_STATUS {
DONE = "DONE",
PENDING = "PENDING",
SETTLED = "SETTLED",
}

export type AuthenticationAction =
Expand Down
2 changes: 1 addition & 1 deletion src/providers/googleSignInAuthentication/contants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const service = {
dispatch.authenticationDispatch?.(
updateAuthentication({
profile: undefined,
status: AUTHENTICATION_STATUS.DONE,
status: AUTHENTICATION_STATUS.SETTLED,
})
),
onSuccess: (r: GoogleProfile) =>
Expand Down

0 comments on commit d6c92e6

Please sign in to comment.