import { DemoResponse } from "@shared/api"; import { useEffect, useState } from "react"; export default function Index() { const [exampleFromServer, setExampleFromServer] = useState(""); // Fetch users on component mount useEffect(() => { fetchDemo(); }, []); // Example of how to fetch data from the server (if needed) const fetchDemo = async () => { try { const response = await fetch("/api/demo"); const data = (await response.json()) as DemoResponse; setExampleFromServer(data.message); } catch (error) { console.error("Error fetching hello:", error); } }; return (
Watch the chat on the left for updates that might need your attention to finish generating
{exampleFromServer}