-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: redesign accordions of fcs and ipc
- Loading branch information
Armanpreet Ghotra
committed
Dec 15, 2024
1 parent
ab7e186
commit 7b49445
Showing
19 changed files
with
365 additions
and
273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import FcsAccordionProps from '@/domain/props/FcsAccordionProps'; | ||
import { useMediaQuery } from '@/utils/resolution.ts'; | ||
|
||
import AccordionContainer from '../../Accordions/AccordionContainer'; | ||
import FcsFoodSecurityAccordion from './FcsFoodSecurityAccordion'; | ||
import FcsMacroEconomicAccordion from './FcsMacroEconomicAccordion'; | ||
|
||
export default function FcsAccordion({ countryData, loading, countryIso3Data, countryName }: FcsAccordionProps) { | ||
const isMobile = useMediaQuery('(max-width: 700px)'); | ||
const foodSecurityAccordion = FcsFoodSecurityAccordion({ countryData }); | ||
const macroEconomicAccordion = FcsMacroEconomicAccordion({ countryData, countryIso3Data }); | ||
|
||
return ( | ||
<> | ||
{!isMobile ? ( | ||
<div className="absolute w-[370px] left-[108px] top-4 z-9999"> | ||
<AccordionContainer | ||
loading={loading} | ||
title={countryName ?? undefined} | ||
accordionModalActive | ||
maxWidth={600} | ||
items={foodSecurityAccordion} | ||
/> | ||
</div> | ||
) : ( | ||
<div className="absolute w-[350px] left-[108px] top-4 z-9999"> | ||
<AccordionContainer | ||
loading={loading} | ||
title={countryName ?? undefined} | ||
accordionModalActive | ||
maxWidth={600} | ||
items={[...foodSecurityAccordion, ...macroEconomicAccordion]} | ||
/> | ||
</div> | ||
)} | ||
{!isMobile && ( | ||
<div className="absolute w-[370px] right-[1rem] inset-y-20 z-9999"> | ||
<AccordionContainer loading={loading} accordionModalActive maxWidth={600} items={macroEconomicAccordion} /> | ||
</div> | ||
)} | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.