import { FormControl, TextField, Button } from "@mui/material"; import { Icon } from "@iconify/react"; import React from "react"; interface Props { pgn: string; setPgn: (pgn: string) => void; } export default function GamePgnInput({ pgn, setPgn }: Props) { const handleFileChange = (event: React.ChangeEvent) => { const file = event.target.files?.[0]; if (file) { const reader = new FileReader(); reader.onload = (e) => { const fileContent = e.target?.result as string; setPgn(fileContent); }; reader.readAsText(file); // Read the file as text } }; return ( setPgn(e.target.value)} rows={8} sx={{ mb: 2 }} /> ); }