Refactor: removed default exports.
This commit is contained in:
1 parent
cd944e14ce
commit
f83a12d6cd
343 files changed
+555
-1046
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import BarChartTooltip from '@/components/charts/BarChartTooltip';
|
||||
import Chart, { ChartProps } from '@/components/charts/Chart';
|
||||
import { BarChartTooltip } from '@/components/charts/BarChartTooltip';
|
||||
import { Chart, ChartProps } from '@/components/charts/Chart';
|
||||
import { useTheme } from '@/components/hooks';
|
||||
import { renderNumberLabels } from '@/lib/charts';
|
||||
import { useMemo, useState } from 'react';
|
||||
@@ -95,5 +95,3 @@ export function BarChart(props: BarChartProps) {
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default BarChart;
|
||||
@@ -15,7 +15,7 @@ const formats = {
|
||||
year: 'yyyy',
|
||||
};
|
||||
|
||||
export default function BarChartTooltip({ tooltip, unit, currency }) {
|
||||
export function BarChartTooltip({ tooltip, unit, currency }) {
|
||||
const { locale } = useLocale();
|
||||
const { labelColors, dataPoints } = tooltip;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ export interface BubbleChartProps extends ChartProps {
|
||||
type?: 'bubble';
|
||||
}
|
||||
|
||||
export default function BubbleChart(props: BubbleChartProps) {
|
||||
export function BubbleChart(props: BubbleChartProps) {
|
||||
const [tooltip, setTooltip] = useState(null);
|
||||
const { type = 'bubble' } = props;
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ import { useState, useRef, useEffect, useMemo, ReactNode } from 'react';
|
||||
import { Loading } from 'react-basics';
|
||||
import classNames from 'classnames';
|
||||
import ChartJS, { LegendItem, ChartOptions } from 'chart.js/auto';
|
||||
import HoverTooltip from '@/components/common/HoverTooltip';
|
||||
import Legend from '@/components/metrics/Legend';
|
||||
import { HoverTooltip } from '@/components/common/HoverTooltip';
|
||||
import { Legend } from '@/components/metrics/Legend';
|
||||
import { DEFAULT_ANIMATION_DURATION } from '@/lib/constants';
|
||||
import styles from './Chart.module.css';
|
||||
|
||||
@@ -151,5 +151,3 @@ export function Chart({
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default Chart;
|
||||
@@ -7,7 +7,7 @@ export interface PieChartProps extends ChartProps {
|
||||
type?: 'doughnut' | 'pie';
|
||||
}
|
||||
|
||||
export default function PieChart(props: PieChartProps) {
|
||||
export function PieChart(props: PieChartProps) {
|
||||
const [tooltip, setTooltip] = useState(null);
|
||||
const { type = 'pie' } = props;
|
||||
|
||||
|
||||
Reference in new issue
Block a user