Skip to content

Commit

Permalink
frontend: convert chart.tsx component
Browse files Browse the repository at this point in the history
Convert the Chart class component in chart.tsx to a functional
component.
  • Loading branch information
NicolaLS committed Jun 4, 2024
1 parent d7187c6 commit 01f035e
Show file tree
Hide file tree
Showing 2 changed files with 377 additions and 393 deletions.
8 changes: 7 additions & 1 deletion frontends/web/src/api/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

import { LineData } from 'lightweight-charts';
import { apiGet, apiPost } from '../utils/request';
import { ChartData } from '../routes/account/summary/chart';
import type { TDetailStatus } from './bitsurance';
import { SuccessResponse } from './response';

Expand Down Expand Up @@ -172,6 +172,12 @@ export const init = (code: AccountCode): Promise<null> => {
return apiPost(`account/${code}/init`);
};

export interface FormattedLineData extends LineData {
formattedValue: string;
}

export type ChartData = FormattedLineData[];

export interface ISummary {
chartDataMissing: boolean;
chartDataDaily: ChartData;
Expand Down
Loading

0 comments on commit 01f035e

Please sign in to comment.