refractor: moved all local state, and component to that component,
used dynamic imports where-ever possible
This commit is contained in:
parent
f67bbbf9ff
commit
eadebd8d93
7 changed files with 167 additions and 150 deletions
|
|
@ -9,13 +9,13 @@ import { Spinner, CustomSelect } from "ui";
|
|||
// icons
|
||||
import { ArrowPathIcon } from "@heroicons/react/24/outline";
|
||||
// types
|
||||
import { IIssue } from "types";
|
||||
import { ICycle, IIssue } from "types";
|
||||
// common
|
||||
import { classNames } from "constants/common";
|
||||
|
||||
type Props = {
|
||||
control: Control<IIssue, any>;
|
||||
handleCycleChange: (cycleId: string) => void;
|
||||
handleCycleChange: (cycle: ICycle) => void;
|
||||
};
|
||||
|
||||
const SelectCycle: React.FC<Props> = ({ control, handleCycleChange }) => {
|
||||
|
|
@ -46,7 +46,7 @@ const SelectCycle: React.FC<Props> = ({ control, handleCycleChange }) => {
|
|||
}
|
||||
value={value}
|
||||
onChange={(value: any) => {
|
||||
handleCycleChange(value);
|
||||
handleCycleChange(cycles?.find((c) => c.id === value) as any);
|
||||
}}
|
||||
>
|
||||
{cycles ? (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue