Skip to content

Conversation

golebu2020
Copy link
Contributor

No description provided.

@golebu2020 golebu2020 marked this pull request as ready for review July 7, 2025 17:12

useEffect(() => {
if (data) {
onDataLoaded(data);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

passing isLoading to onLoadingDone after data is present, at this point, isLoading will likely already be false - this can be possibly redundant

loaderProps={{ color: 'pink', type: 'bars' }}
/>
<div className="relative">
<CostSummary data={costData!} selectedDate={selectedDate} viewMode={viewMode} />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CostSummary Is rendered before data check (rendering chart) If costData is undefined or loading failure, it could crash because to !

<CostSummary data={costData!} selectedDate={selectedDate} viewMode={viewMode} />
<Button onClick={async () => {}} className="absolute right-0 top-[10px]">
Download PDF
</Button>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no this button do nothing

import LoadingBox from '@/components/generic/LoadingBox';
import MonthlyCostSummary from '@/components/private-cloud/monthly-cost/MonthlyCostSummary';
import { useEffect } from 'react';
import MonthlyCostChart from '@/components/private-cloud/monthly-cost/MonthyCostChart';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo in file name MonthyCostChart

Cost to date at{' '}
<strong className="text-gray-800">
{}
{currentMonth} {currentMonthDay}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this empty object for?

@@ -0,0 +1,128 @@
import { monthNames } from '@/constants/common';
import { MonthlyCost, QuarterlyCost, TimeView, YearlyCost } from '@/types/private-cloud';
import { getDaysBetweenDates, extractDateRanges, formatCurrency, getQuarterValue, cn } from '@/utils/js';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cn import is not used

Copy link

sonarqubecloud bot commented Jul 7, 2025

@golebu2020 golebu2020 merged commit f44880b into main Jul 7, 2025
10 of 11 checks passed
@golebu2020 golebu2020 deleted the feat/5957 branch July 7, 2025 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants