import { useEffect, useState } from "react"; import Head from "next/head"; import tw from "tailwind-styled-components"; import Graph from "../components/index/Graph"; import TaskInfo from "../components/index/TaskInfo"; import { TaskData } from "../lib/types"; const Home = () => { const [data, setData] = useState(null); const [selectedTask, setSelectedTask] = useState(null); const [isTaskInfoExpanded, setIsTaskInfoExpanded] = useState(false); useEffect(() => { // Load the JSON data from the public folder fetch("/graph.json") .then((response) => response.json()) .then((data) => { setData(data); }) .catch((error) => { console.error("Error fetching the graph data:", error); }); }, []); return ( <> agbenchmark
{data && ( )}
); }; export default Home; const Panels = tw.div` flex h-full w-full `;