Skip to content

Commit

Permalink
fix: ts error
Browse files Browse the repository at this point in the history
  • Loading branch information
blushi committed Dec 9, 2024
1 parent a4733b0 commit 5cfed1c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,21 @@ const GridItem: React.FC<React.PropsWithChildren<unknown>> = ({ children }) => (
{children}
</Grid>
);
export type ProjectBatchTotalsProps = {
totals: BatchTotalsForProject & { registeredAmount?: number };
projectWithOrderData?: NormalizeProject;
soldOutProjectsIds: string[];
sx?: SxProps<Theme>;
className?: string;
};

export function ProjectBatchTotals({
totals,
projectWithOrderData,
soldOutProjectsIds,
sx = [],
className,
}: {
totals: BatchTotalsForProject & { registeredAmount?: number };
projectWithOrderData?: NormalizeProject;
soldOutProjectsIds: string[];
sx?: SxProps<Theme>;
className?: string;
}): JSX.Element {
}: ProjectBatchTotalsProps): JSX.Element {
const { _ } = useLingui();
const isSoldOut = getIsSoldOut({
project: projectWithOrderData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import { Prefinance } from 'components/templates/ProjectDetails/ProjectDetails.P
import TerrasosCreditsInfo from 'components/templates/ProjectDetails/TerrasosCreditsInfo/TerrasosCreditsInfo';
import { useTags } from 'hooks/useTags';

import { ProjectBatchTotals } from '../../molecules';
import { ProjectBatchTotals, ProjectBatchTotalsProps } from '../../molecules';
import { ProjectTopSectionCreditClassCard } from './ProjectTopSection.CreditClassCard';
import {
ProjectTopSectionQuoteMark,
Expand Down Expand Up @@ -220,7 +220,7 @@ function ProjectTopSection({
normalizedProject?.complianceCredits.creditsRegistered ?? 0,
retiredAmount: normalizedProject?.complianceCredits.creditsRetired ?? 0,
tradableAmount: normalizedProject?.complianceCredits.creditsAvailable ?? 0,
};
} as ProjectBatchTotalsProps['totals'];

const isComplianceProject =
normalizedProject?.marketType?.includes(COMPLIANCE_MARKET) ?? false;
Expand Down

0 comments on commit 5cfed1c

Please sign in to comment.