Update to TypeScript 4

This commit is contained in:
Dane Everitt 2021-05-08 10:37:18 -07:00
parent 0cd1362b05
commit 5a82dd6a18
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
8 changed files with 286 additions and 94 deletions

View file

@ -24,7 +24,7 @@ const LazyCodemirrorEditor = lazy(() => import(/* webpackChunkName: "editor" */'
export default () => {
const [ error, setError ] = useState('');
const { action } = useParams();
const { action } = useParams<{ action: 'new' | string }>();
const [ loading, setLoading ] = useState(action === 'edit');
const [ content, setContent ] = useState('');
const [ modalVisible, setModalVisible ] = useState(false);