Commit c968d526 authored by Ridwan Amode's avatar Ridwan Amode
Browse files

singular for remove hook

parent 15120a37
Pipeline #293484 passed with stages
in 5 minutes and 9 seconds
......@@ -60,7 +60,7 @@ const BlastInputSequences = () => {
} else if (typeof index === 'number') {
const newSequences = [...sequences].filter((_, i) => i !== index);
updateSequences(newSequences);
blastFormContext?.removeSequenceValidityFlags(index);
blastFormContext?.removeSequenceValidityFlag(index);
}
};
......
......@@ -20,7 +20,7 @@ import useBlastForm from 'src/content/app/tools/blast/hooks/useBlastForm';
type BlastFormContextType = {
updateSequenceValidityFlags: (index: number | null, status: boolean) => void;
removeSequenceValidityFlags: (index: number) => void;
removeSequenceValidityFlag: (index: number) => void;
sequenceValidityFlags: boolean[];
};
......@@ -48,7 +48,7 @@ export const BlastFormContextContainer = (props: Props) => {
setSequenceValidityFlags(array);
};
const removeSequenceValidityFlags = (index: number) => {
const removeSequenceValidityFlag = (index: number) => {
setSequenceValidityFlags(
sequenceValidityFlags.filter((value, i) => i !== index)
);
......@@ -57,7 +57,7 @@ export const BlastFormContextContainer = (props: Props) => {
<BlastFormContext.Provider
value={{
updateSequenceValidityFlags,
removeSequenceValidityFlags,
removeSequenceValidityFlag,
sequenceValidityFlags
}}
>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment