Rename AppBarChart -> AppPieChart
Because it is a pie chart not a bar chart...
This commit is contained in:
parent
347423698d
commit
589efb56bd
|
@ -7,7 +7,7 @@ export interface Option {
|
||||||
label: string;
|
label: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function AppBarChart({ options }: { options: Option[] }) {
|
export default function AppPieChart({ options }: { options: Option[] }) {
|
||||||
const { width } = useWindowDimensions();
|
const { width } = useWindowDimensions();
|
||||||
const { colors } = useTheme();
|
const { colors } = useTheme();
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { useFocusEffect } from "@react-navigation/native";
|
||||||
import { useCallback, useState } from "react";
|
import { useCallback, useState } from "react";
|
||||||
import { ScrollView, View } from "react-native";
|
import { ScrollView, View } from "react-native";
|
||||||
import { IconButton, Text } from "react-native-paper";
|
import { IconButton, Text } from "react-native-paper";
|
||||||
import AppBarChart from "./AppBarChart";
|
import AppPieChart from "./AppPieChart";
|
||||||
import Chart from "./Chart";
|
import Chart from "./Chart";
|
||||||
import ConfirmDialog from "./ConfirmDialog";
|
import ConfirmDialog from "./ConfirmDialog";
|
||||||
import DrawerHeader from "./DrawerHeader";
|
import DrawerHeader from "./DrawerHeader";
|
||||||
|
@ -117,7 +117,7 @@ export default function InsightsPage() {
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{weekCounts?.length > 0 && (
|
{weekCounts?.length > 0 && (
|
||||||
<AppBarChart
|
<AppPieChart
|
||||||
options={weekCounts.map((weekCount) => ({
|
options={weekCounts.map((weekCount) => ({
|
||||||
label: DAYS[weekCount.week],
|
label: DAYS[weekCount.week],
|
||||||
value: weekCount.count,
|
value: weekCount.count,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user