import { mockBoxPlotData, mockCategoricalData, mockLineData, moreMockCategoricalData, } from "data/mocks"; import { pageRoutes } from "data/routes"; import React from "react"; import { useWindowDimensions } from "utils/getWindowDimensions"; import { useIsMobile } from "utils/isMobile"; import { BarGraphVertical, BarGraphHorizontal } from "@/components/BarGraph"; import { BottomNav } from "@/components/BottomNav"; import { BoxPlot } from "@/components/Boxplot"; import { ComponentWrapper } from "@/components/ComponentWrapper"; import { Header } from "@/components/Header"; import { LineGraph } from "@/components/LineGraph"; import { SectionHeader } from "@/components/SectionHeader"; import { WordCloud } from "@/components/WordCloud"; import styles from "./samplePage.module.css"; export default function SamplePage() { const { width } = useWindowDimensions(); const isMobile = useIsMobile(); // For components that are in the side wrappers, it looks better if they fill a certain amount of width, so we can make the width dynamic like this const defaultGraphWidth = isMobile ? width / 1.25 : width / 2; const defaultGraphHeight = 500; // Make vars for common configs such as common margins const defaultVerticalBarGraphMargin = { top: 20, bottom: 80, left: 60, right: 20, }; const defaultHorizontalBarGraphMargin = { top: 20, bottom: 80, left: 120, right: 20, }; return (
({ text: word.key, value: word.value, }))} // For components that we don't want to match the width necessarily we can provide direct values width={defaultGraphWidth} height={defaultGraphHeight} /> ({ text: word.key, value: word.value, }))} width={defaultGraphWidth} height={defaultGraphHeight} /> ({ text: word.key, value: word.value, }))} width={defaultGraphWidth} height={defaultGraphHeight} /> ({ text: word.key, value: word.value, }))} width={defaultGraphWidth} height={defaultGraphHeight} /> ({ text: word.key, value: word.value, }))} width={defaultGraphWidth} height={defaultGraphHeight} />
); }