import axios from 'axios' import { useState } from 'react' import { API_BASE_URL } from '@/config' export default () => { const [threadName, setThreadName] = useState ('') const [threadDescription, setThreadDescription] = useState ('') const submit = async () => { const formData = new FormData formData.append ('title', threadName) formData.append ('description', threadDescription) try { await axios.post (`${ API_BASE_URL }/threads`, formData) } catch { ; } } return (
) }