Skip to content

Commit

Permalink
fix: variable name change
Browse files Browse the repository at this point in the history
  • Loading branch information
cephaschapa committed Jun 11, 2024
1 parent 4777142 commit aad5f8f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function SubSectorPage({
return t("stationary-energy");
}
};
const getSubsectorData = useSelector(
const subsectorData = useSelector(
(state: RootState) => state.subsector.subsector,
);

Expand Down Expand Up @@ -210,7 +210,7 @@ function SubSectorPage({
</BreadcrumbItem>
<BreadcrumbItem>
<BreadcrumbLink href="#" color="content.link">
{getSubsectorData?.subsectorName}
{subsectorData?.subsectorName}
</BreadcrumbLink>
</BreadcrumbItem>
</Breadcrumb>
Expand All @@ -222,9 +222,9 @@ function SubSectorPage({
</Box>
<Box display="flex" gap="16px" flexDirection="column">
<Text fontFamily="heading" fontSize="headline.md" fontWeight="bold">
{getSubsectorData?.referenceNumber +
{subsectorData?.referenceNumber +
" " +
getSubsectorData?.subsectorName}
subsectorData?.subsectorName}
</Text>
<Text
fontFamily="heading"
Expand Down
4 changes: 2 additions & 2 deletions app/src/app/[lng]/[inventory]/data/[step]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ export default function AddDataSteps({
};
}, []);

const subSectorData = (currentStepName: string) => {
const getCurrentStepParam = (currentStepName: string) => {
switch (currentStepName) {
case t("stationary-energy"):
return 1;
Expand Down Expand Up @@ -806,7 +806,7 @@ export default function AddDataSteps({
}),
);
router.push(
`/${inventory}/data/${subSectorData(currentStep.title)}/${subSector.sectorId}`,
`/${inventory}/data/${getCurrentStepParam(currentStep.title)}/${subSector.sectorId}`,
);
}}
key={subSector.subsectorId}
Expand Down

0 comments on commit aad5f8f

Please sign in to comment.