import { BugReportOutlined } from "@mui/icons-material"; import { Box, Button, IconButton, useTheme } from "@mui/material"; import { fetch } from "@tauri-apps/plugin-http"; import { useAtom } from "jotai"; import { useState } from "react"; import { serverUrlAtom } from "../../lib/jotai"; import { defaultSettings } from "../../lib/settings"; import { FloatingDialog } from "../Generic/FloatingDialog"; export const Testing = () => { // contexts const theme = useTheme(); // atoms const [serverUrl, setServerUrl] = useAtom(serverUrlAtom); // states const [openState, setOpenState] = useState(false); const [maximisedState, setMaximisedState] = useState(false); // functions const close = () => setOpenState(false); const testing = () => { fetch(serverUrl + "/nuke-db").then((response) => { console.log(response); }); fetch(serverUrl + "/setup-demo-db").then((response) => { console.log(response); }); }; return ( } close={close} maximisedState={maximisedState} openButton={ setOpenState(true)} size="small" > } openState={openState} setMaximisedState={setMaximisedState} title="Testing" /> ); };