Skip to content

Commit

Permalink
Merge pull request #29 from PepperDash/feature/documentation
Browse files Browse the repository at this point in the history
Feature/documentation
  • Loading branch information
ndorin authored Aug 28, 2024
2 parents 22a8e48 + 61fb16f commit 15ae207
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ export const useGetAllDeviceStateFromRoomConfiguration = ({config}: {config: Roo

if(config.audioControlPointList) {
Object.values(config.audioControlPointList?.levelControls).forEach((lcl) => {
deviceKeys.push(lcl.parentDeviceKey + "--" + lcl.itemKey);
// if the level control has an item key, combine it with the parent device key
if(lcl.itemKey) {
deviceKeys.push(lcl.parentDeviceKey + "--" + lcl.itemKey);
} else {
deviceKeys.push(lcl.parentDeviceKey);
}
});
}

Expand Down
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 15ae207

Please sign in to comment.