From 5a165a9f51ba65b8790ca8783a5e4b24484e4b7a Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Wed, 28 Aug 2024 11:17:32 -0600 Subject: [PATCH] feat: adds partner metadata to appConfig slice --- src/lib/store/appConfig/appConfig.slice.ts | 7 +++++++ src/lib/store/appConfig/appConfigSelectors.ts | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/lib/store/appConfig/appConfig.slice.ts b/src/lib/store/appConfig/appConfig.slice.ts index c05d772..0fd75f9 100644 --- a/src/lib/store/appConfig/appConfig.slice.ts +++ b/src/lib/store/appConfig/appConfig.slice.ts @@ -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; diff --git a/src/lib/store/appConfig/appConfigSelectors.ts b/src/lib/store/appConfig/appConfigSelectors.ts index 6c69ee8..e963f04 100644 --- a/src/lib/store/appConfig/appConfigSelectors.ts +++ b/src/lib/store/appConfig/appConfigSelectors.ts @@ -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); \ No newline at end of file +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); \ No newline at end of file