diff --git a/packages/client/app.defaults.json b/packages/client/app.defaults.json index 2ce74aba..c07d69e3 100644 --- a/packages/client/app.defaults.json +++ b/packages/client/app.defaults.json @@ -42,6 +42,10 @@ "description": "211 connects callers, at no cost, to critical health and human services in their community. If you're unable to find a service, please dial 211 for assistance." }, "showLocationInput": false + }, + "resource": { + "hideCategories": false, + "hideLastAssured": false } }, "menus": { diff --git a/packages/client/components/organisms/ResourceOverviewSection.tsx b/packages/client/components/organisms/ResourceOverviewSection.tsx index 83a7f355..cb64b504 100644 --- a/packages/client/components/organisms/ResourceOverviewSection.tsx +++ b/packages/client/components/organisms/ResourceOverviewSection.tsx @@ -20,6 +20,7 @@ import { USER_PREF_COORDS, USER_PREF_LOCATION, } from '../../lib/constants/cookies'; +import { useAppConfig } from '../../lib/hooks/useAppConfig'; type Props = { id: string; @@ -45,6 +46,7 @@ export function ResourceOverviewSection(props: Props) { const theme = useMantineTheme(); const [cookies] = useCookies(); const [coords, setCoords] = useState(null); + const config = useAppConfig(); useEffect(() => { if (cookies[USER_PREF_COORDS] && cookies[USER_PREF_LOCATION]) { @@ -76,36 +78,44 @@ export function ResourceOverviewSection(props: Props) { - - {t('categories')} - - - {props.categories?.map((el: any) => { - return ( - - {el.name} - - ); - })} - + {config?.pages?.resource?.hideCategories ? null : ( + <> + + {t('categories')} + + + {props.categories?.map((el: any) => { + return ( + + {el.name} + + ); + })} + + + )} - - {t('last_assured')} - - {props.lastAssuredOn || t('unknown')} + {config?.pages?.resource?.hideLastAssured ? null : ( + <> + + {t('last_assured')} + + {props.lastAssuredOn || t('unknown')} + + )}