Skip to content

Commit

Permalink
feat: adds partner metadata to appConfig slice
Browse files Browse the repository at this point in the history
  • Loading branch information
ndorin committed Aug 28, 2024
1 parent 90828bf commit 5a165a9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/lib/store/appConfig/appConfig.slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,17 @@ export interface AppConfig {
iconSet: IconType;
loginMode: string;
modes: { [key: string]: unknown };
partnerMetadata?: PartnerMetadata[];
}

export type IconType = 'GOOGLE' | 'HABANERO' | 'NEO';

export interface PartnerMetadata {
role: string;
description: string;
logoPath: string;
}


export const appConfigActions = appConfigSlice.actions;
export const appConfigReducer = appConfigSlice.reducer;
6 changes: 5 additions & 1 deletion src/lib/store/appConfig/appConfigSelectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ import { useAppSelector } from '../hooks';

export const useAppConfig = () => useAppSelector((state) => state.appConfig.config);

export const useApiPath = () => useAppSelector((state) => state.appConfig.config.apiPath);
export const useApiPath = () => useAppSelector((state) => state.appConfig.config.apiPath);

export const useLogoPath = () => useAppSelector((state) => state.appConfig.config.logoPath);

export const usePartnerMetadata = () => useAppSelector((state) => state.appConfig.config.partnerMetadata);

0 comments on commit 5a165a9

Please sign in to comment.