Updated charts component
This commit is contained in:
24
src/app/CommandResponsesChart.tsx
Normal file
24
src/app/CommandResponsesChart.tsx
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
import { JSX } from "react";
|
||||||
|
import { Heading, VStack } from "@chakra-ui/react";
|
||||||
|
import LineChartComponent from "@/components/charts/LineChart";
|
||||||
|
import { LineChartArr } from "@/types/LineChartStats";
|
||||||
|
|
||||||
|
interface CommandResponsesChartProps {
|
||||||
|
lineChartData: LineChartArr;
|
||||||
|
}
|
||||||
|
|
||||||
|
const CommandResponsesChart = ({
|
||||||
|
lineChartData
|
||||||
|
}: CommandResponsesChartProps): JSX.Element => {
|
||||||
|
return (
|
||||||
|
<VStack gap={4} w="100%">
|
||||||
|
<Heading
|
||||||
|
as="h2"
|
||||||
|
fontSize="2xl"
|
||||||
|
>{`Commands Responded To (Past 30 Days)`}</Heading>
|
||||||
|
<LineChartComponent data={lineChartData} label="Command Responses" />
|
||||||
|
</VStack>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default CommandResponsesChart;
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
import { JSX } from "react";
|
import { JSX } from "react";
|
||||||
|
import { Heading, VStack } from "@chakra-ui/react";
|
||||||
import LineChartComponent from "@/components/charts/LineChart";
|
import LineChartComponent from "@/components/charts/LineChart";
|
||||||
import { LineChartArr } from "@/types/LineChartStats";
|
import { LineChartArr } from "@/types/LineChartStats";
|
||||||
|
|
||||||
@@ -9,7 +10,12 @@ interface LinksDeletedChartProps {
|
|||||||
const LinksDeletedChart = ({
|
const LinksDeletedChart = ({
|
||||||
lineChartData
|
lineChartData
|
||||||
}: LinksDeletedChartProps): JSX.Element => {
|
}: LinksDeletedChartProps): JSX.Element => {
|
||||||
return <LineChartComponent data={lineChartData} label="Triggers" />;
|
return (
|
||||||
|
<VStack gap={4} w="100%">
|
||||||
|
<Heading as="h2" fontSize="2xl">{`Links Deleted (Past 30 Days)`}</Heading>
|
||||||
|
<LineChartComponent data={lineChartData} label="Links Deleted" />
|
||||||
|
</VStack>
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default LinksDeletedChart;
|
export default LinksDeletedChart;
|
||||||
|
|||||||
24
src/app/TimesTriggeredChart.tsx
Normal file
24
src/app/TimesTriggeredChart.tsx
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
import { JSX } from "react";
|
||||||
|
import LineChartComponent from "@/components/charts/LineChart";
|
||||||
|
import { LineChartArr } from "@/types/LineChartStats";
|
||||||
|
import { Heading, VStack } from "@chakra-ui/react";
|
||||||
|
|
||||||
|
interface TimedTriggeredChartProps {
|
||||||
|
lineChartData: LineChartArr;
|
||||||
|
}
|
||||||
|
|
||||||
|
const TimedTriggeredChart = ({
|
||||||
|
lineChartData
|
||||||
|
}: TimedTriggeredChartProps): JSX.Element => {
|
||||||
|
return (
|
||||||
|
<VStack gap={4} w="100%">
|
||||||
|
<Heading
|
||||||
|
as="h2"
|
||||||
|
fontSize="2xl"
|
||||||
|
>{`Times Bot Was Triggered (Past 30 Days)`}</Heading>
|
||||||
|
<LineChartComponent data={lineChartData} label="Times Triggered" />
|
||||||
|
</VStack>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default TimedTriggeredChart;
|
||||||
Reference in New Issue
Block a user