import type { NextPage } from "next"; import dynamic from "next/dynamic"; import { Play } from "phosphor-react"; import Hotkeys from "react-hot-keys"; import Split from "react-split"; import { useSnapshot } from "valtio"; import Box from "../../components/Box"; import Button from "../../components/Button"; import state from "../../state"; import { compileCode } from "../../state/actions"; import { getSplit, saveSplit } from "../../state/actions/persistSplits"; const HooksEditor = dynamic(() => import("../../components/HooksEditor"), { ssr: false, }); const LogBox = dynamic(() => import("../../components/LogBox"), { ssr: false, }); const Home: NextPage = () => { const snap = useSnapshot(state); return ( saveSplit("developVertical", e)} >
{snap.files[snap.active]?.name?.split(".")?.[1].toLowerCase() === "c" && ( !snap.compiling && snap.files.length && compileCode(snap.active) } > )}
(state.logs = [])} logs={snap.logs} />
); }; export default Home;