Skip to content

Commit

Permalink
fix: rename foodAccordion, nutritionAccordion, macroEconomicAccoridon
Browse files Browse the repository at this point in the history
  • Loading branch information
Armanpreet Ghotra committed Dec 20, 2024
1 parent a126155 commit c70a61e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/components/Map/FcsMap/FcsAccordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import AccordionContainer from '../../Accordions/AccordionContainer';

export default function FcsAccordion({ countryData, loading, countryIso3Data, countryName }: FcsAccordionProps) {
const isMobile = useMediaQuery('(max-width: 700px)');
const foodSecurityAccordion = FcsFoodSecurityOperations.getFcsFoodSecurityAccordionItems(
const foodSecurityAccordionItems = FcsFoodSecurityOperations.getFcsFoodSecurityAccordionItems(
countryData,
countryIso3Data
);
const macroEconomicAccordion = FcsMacroEconomicOperations.getMacroEconomicAccordionItems(
const macroEconomicAccordionItems = FcsMacroEconomicOperations.getMacroEconomicAccordionItems(
countryData,
countryIso3Data
);
Expand All @@ -23,7 +23,7 @@ export default function FcsAccordion({ countryData, loading, countryIso3Data, co
title={countryName}
accordionModalActive
maxWidth={600}
items={[...foodSecurityAccordion, ...macroEconomicAccordion]}
items={[...foodSecurityAccordionItems, ...macroEconomicAccordionItems]}
/>
</div>
) : (
Expand All @@ -35,12 +35,12 @@ export default function FcsAccordion({ countryData, loading, countryIso3Data, co
multipleSelectionMode
accordionModalActive
maxWidth={600}
items={foodSecurityAccordion}
items={foodSecurityAccordionItems}
expandAll
/>
</div>
<div className="absolute w-[300px] right-[1rem] inset-y-24 z-9999">
<AccordionContainer loading={loading} accordionModalActive maxWidth={600} items={macroEconomicAccordion} />
<AccordionContainer loading={loading} accordionModalActive maxWidth={600} items={macroEconomicAccordionItems} />
</div>
</>
);
Expand Down
6 changes: 3 additions & 3 deletions src/components/Map/IpcMap/IpcAccordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ export default function IpcAccordion({ countryData, countryName, countryIso3Data
const deltaOneMonth = countryData?.fcsMinus1 ? countryData.fcs - countryData.fcsMinus1 : null;
const deltaThreeMonth = countryData?.fcsMinus3 ? countryData.fcs - countryData.fcsMinus3 : null;

const ipcFoodSecurityAccordion = IpcFoodSecurityAccordionOperations.getFoodSecurityAccordionItems(
const foodSecurityAccordionItems = IpcFoodSecurityAccordionOperations.getFoodSecurityAccordionItems(
countryData,
deltaOneMonth,
deltaThreeMonth
);
const ipcNutrititonAccordion = IpcFoodSecurityAccordionOperations.getNutritionAccordionItems(countryIso3Data);
const nutrititonAccordionItems = IpcFoodSecurityAccordionOperations.getNutritionAccordionItems(countryIso3Data);
const isMobile = useMediaQuery('(max-width: 700px)');

return (
Expand All @@ -21,7 +21,7 @@ export default function IpcAccordion({ countryData, countryName, countryIso3Data
title={countryName}
accordionModalActive
maxWidth={600}
items={[ipcFoodSecurityAccordion, ipcNutrititonAccordion]}
items={[foodSecurityAccordionItems, nutrititonAccordionItems]}
multipleSelectionMode={!isMobile}
expandAll={!isMobile}
/>
Expand Down

0 comments on commit c70a61e

Please sign in to comment.