Skip to content

Commit

Permalink
feat(auth): update AccountStore with modal state
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristiaanScheermeijer committed Jul 19, 2021
1 parent 9474f87 commit db2db50
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/stores/AccountStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,24 @@ import type { AuthData, Customer, JwtDetails } from '../../types/account';

import { ConfigStore } from './ConfigStore';

export enum AccountModalView {
LOGIN,
}

type AccountStore = {
modal: {
open: boolean;
view: AccountModalView
},
auth: AuthData | null,
user: Customer | null,
};

export const AccountStore = new Store<AccountStore>({
modal: {
open: false,
view: AccountModalView.LOGIN,
},
auth: null,
user: null,
});
Expand Down

0 comments on commit db2db50

Please sign in to comment.