import { useState } from "react"; import { invoke } from "@tauri-apps/api"; import { Box, Button, Grid, TextField, Typography } from "@mui/material"; const RulesPage = () => { const [url, setUrl] = useState(""); const onClick = async () => { if (!url) return; const data = await invoke("cmd_import_profile", { url }); console.log(data); }; return ( Rules setUrl(e.target.value)} /> ); }; export default RulesPage;