We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Current logic
export const useSections = (): Array<Section> => { const user = useUser() const { countryIso } = useCountryRouteParams() const assessment = useAssessment() const cycle = useCycle() return useMemo(() => { const sections: Array<Section> = [] if (!cycle) return null const isFra2020 = assessment.props.name === AssessmentNames.fra && cycle.name === '2020' const showOverview = isFra2020 || Areas.isISOCountry(countryIso) if (showOverview) { sections.push({ name: SectionNames.Country.Home.overview, component: Overview }) }
Proposal (pseudo)
export const useSections = (): Array<Section> => { const user = useUser() const { countryIso } = useCountryRouteParams() const assessment = useAssessment() const cycle = useCycle() const dashboardItems = getDashboardItems() return useMemo(() => { const sections: Array<Section> = [] if (!cycle) return null const hasDashboardItems = dashboarditems.length > 0 if (hasDashboardItems ) { sections.push({ name: SectionNames.Country.Home.overview, component: Overview }) }
The text was updated successfully, but these errors were encountered:
sorja
Successfully merging a pull request may close this issue.
Current logic
Proposal (pseudo)
The text was updated successfully, but these errors were encountered: