{accounts?.map(acc => (
))}
);
} else {
return null;
}
};
export default function WebsiteEditForm({ values, onSave, onClose }) {
const { post } = useApi();
const { data: accounts } = useFetch(`/accounts`);
const { user } = useUser();
const [message, setMessage] = useState();
const handleSubmit = async values => {
const { ok, data } = await post('/website', values);
if (ok) {
onSave();
} else {
setMessage(
data ||