// К примеру
import fs from 'fs'
// На это
const fs = require('fs');
import { useNavigate } from "react-router-dom";
function SignupForm() {
let navigate = useNavigate();
async function handleSubmit(event) {
event.preventDefault();
await submitForm(event.target);
navigate("../success", { replace: true });
}
return <form onSubmit={handleSubmit}>{/* ... */}</form>;
}
channels = {
d.entity.username: d.entity
for d in client.get_dialogs()
if d.is_channel
}