React 18 and Vite (#4510)

This commit is contained in:
Matthew Penner 2022-11-25 13:25:03 -07:00 committed by GitHub
parent 1bb1b13f6d
commit 21613fa602
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
244 changed files with 4547 additions and 8933 deletions

View file

@ -1,4 +1,4 @@
import React, { useState } from 'react';
import { useState } from 'react';
import deleteSchedule from '@/api/server/schedules/deleteSchedule';
import { ServerContext } from '@/state/server';
import { Actions, useStoreActions } from 'easy-peasy';
@ -16,7 +16,7 @@ interface Props {
export default ({ scheduleId, onDeleted }: Props) => {
const [visible, setVisible] = useState(false);
const [isLoading, setIsLoading] = useState(false);
const uuid = ServerContext.useStoreState((state) => state.server.data!.uuid);
const uuid = ServerContext.useStoreState(state => state.server.data!.uuid);
const { addError, clearFlashes } = useStoreActions((actions: Actions<ApplicationStore>) => actions.flashes);
const onDelete = () => {
@ -27,7 +27,7 @@ export default ({ scheduleId, onDeleted }: Props) => {
setIsLoading(false);
onDeleted();
})
.catch((error) => {
.catch(error => {
console.error(error);
addError({ key: 'schedules', message: httpErrorToHuman(error) });