Skip to content

Commit

Permalink
fix single benefit welcome view
Browse files Browse the repository at this point in the history
  • Loading branch information
wbglaeser committed Dec 13, 2024
1 parent 9fc6d78 commit d97593a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions src/ui/screens/benefit-page/components/BenefitPageHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined";
import React, {useState} from "react";
import {useStore} from "../../../shared-components/ViewportUpdater";
import {Link} from "react-router-dom";
import {useValidationReportStore} from "../../../storage/zustand";
import {useSelectedBenefitStore, useSelectedTopicsStore, useValidationReportStore} from "../../../storage/zustand";
import useIsMissingDataBenefit from "../hooks/useIsMissingDataBenefit";
import useTranslation from "../../../language/useTranslation";

Expand All @@ -17,9 +17,11 @@ const BenefitPageHeader = ({id, benefit}) => {
const isDesktop = useStore((state) => state.isDesktop);
const titleFontSize = isDesktop ? '32px' : '28px';

const setSelectedBenefit = useSelectedBenefitStore((state) => state.setSelectedBenefit);
const clearSelectedTopics = useSelectedTopicsStore((state) => state.clear);
const validationReport = useValidationReportStore((state) => state.validationReport);
const isMissingDataBenefit = useIsMissingDataBenefit(id, validationReport);

const isMissingDataBenefit = useIsMissingDataBenefit(id, validationReport);

return (
<VStack gap={0} alignItems={'flex-start'} sx={{
Expand Down Expand Up @@ -67,6 +69,10 @@ const BenefitPageHeader = ({id, benefit}) => {
<Box sx={{width: '100%', mb: 2}}>
<Button
variant="contained"
onClick={() => {
setSelectedBenefit(id);
clearSelectedTopics()
}}
sx={{
backgroundColor: 'secondary.main',
borderColor: 'secondary.main',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const OnboardingWelcomeOverview = () => {
<VStack alignItems={'flex-start'}>
<VStack gap={2} alignItems={'flex-start'}>
<Typography variant="h6" sx={styles.listHeader}>
{getRpTitle()}
{metadata.rp && getRpTitle()}
</Typography>
</VStack>
</VStack>
Expand Down

0 comments on commit d97593a

Please sign in to comment.