Skip to content

Commit

Permalink
Missed commit with last code review changes to DataUploadForm
Browse files Browse the repository at this point in the history
  • Loading branch information
theosanderson authored Feb 21, 2024
1 parent afc2156 commit 92cee5e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions website/src/components/Submission/DataUploadForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Menu } from '@headlessui/react';
import { isErrorFromAlias } from '@zodios/core';
import type { AxiosError } from 'axios';
import { type DateTime } from 'luxon';
import { type FormEvent, useMemo, useState, useRef, useEffect, useCallback } from 'react';
import { type FormEvent, useMemo, useState, useRef, useEffect, useCallback, type ElementType } from 'react';

Check failure on line 5 in website/src/components/Submission/DataUploadForm.tsx

View workflow job for this annotation

GitHub Actions / Check format

'useMemo' is defined but never used

import { DateChangeModal } from './DateChangeModal';
import { getClientLogger } from '../../clientLogger.ts';
Expand Down Expand Up @@ -238,7 +238,7 @@ const UploadComponent = ({
setFile: (file: File | null) => void;
name: string;
title: string;
Icon: React.ElementType;
Icon: ElementType;
fileType: string;
}) => {
const [myFile, rawSetMyFile] = useState<File | null>(null);
Expand Down Expand Up @@ -286,6 +286,7 @@ const UploadComponent = ({
}
});
}, 500);

return () => clearInterval(interval);
}, [myFile, setMyFile]);
return (
Expand Down Expand Up @@ -355,7 +356,7 @@ const InnerDataUploadForm = ({
const [sequenceFile, setSequenceFile] = useState<File | null>(null);
const [exampleEntries, setExampleEntries] = useState<number | undefined>(10);

const noGroup = useMemo(() => groupsOfUser.length === 0, [groupsOfUser]);
const noGroup = groupsOfUser.length === 0;

const { submit, revise, isLoading } = useSubmitFiles(accessToken, organism, clientConfig, onSuccess, onError);
const [selectedGroupName, setSelectedGroupName] = useState<string | undefined>(
Expand Down

0 comments on commit 92cee5e

Please sign in to comment.