Skip to content

Commit

Permalink
fix: fix mobile version of fcs
Browse files Browse the repository at this point in the history
  • Loading branch information
Armanpreet Ghotra committed Dec 19, 2024
1 parent 2af98d6 commit a126155
Showing 1 changed file with 14 additions and 19 deletions.
33 changes: 14 additions & 19 deletions src/components/Map/FcsMap/FcsAccordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,18 @@ export default function FcsAccordion({ countryData, loading, countryIso3Data, co
countryIso3Data
);

return (
return isMobile ? (
<div className="absolute w-[350px] left-[108px] top-4 z-9999">
<AccordionContainer
loading={loading}
title={countryName}
accordionModalActive
maxWidth={600}
items={[...foodSecurityAccordion, ...macroEconomicAccordion]}
/>
</div>
) : (
<>
{isMobile && (
<div className="absolute w-[350px] left-[108px] top-4 z-9999">
<AccordionContainer
loading={loading}
title={countryName}
accordionModalActive
maxWidth={600}
items={[...foodSecurityAccordion, ...macroEconomicAccordion]}
/>
</div>
)}
: (
<div className="absolute w-[310px] left-[108px] top-4 z-9999 overflow-y-scroll max-h-screen">
<AccordionContainer
loading={loading}
Expand All @@ -41,12 +39,9 @@ export default function FcsAccordion({ countryData, loading, countryIso3Data, co
expandAll
/>
</div>
)
{!isMobile && (
<div className="absolute w-[300px] right-[1rem] inset-y-24 z-9999">
<AccordionContainer loading={loading} accordionModalActive maxWidth={600} items={macroEconomicAccordion} />
</div>
)}
<div className="absolute w-[300px] right-[1rem] inset-y-24 z-9999">
<AccordionContainer loading={loading} accordionModalActive maxWidth={600} items={macroEconomicAccordion} />
</div>
</>
);
}

0 comments on commit a126155

Please sign in to comment.