chore: apply review feedbacks and add refactoring todo

This commit is contained in:
Alexandre Bodin 2024-01-16 10:57:44 +01:00
parent fe983aff15
commit 37b3dbf893
3 changed files with 4 additions and 1 deletions

View File

@ -10,6 +10,7 @@ interface GenericInputProps extends Record<string, unknown> {
label: string;
}
// TODO: refactor this to be actually typesafe instead of casting
const GenericInput = ({
type,
options,

View File

@ -24,7 +24,8 @@ export interface LayoutDndProviderProps {
children?: React.ReactNode;
}
const LayoutDndContext = React.createContext<LayoutDndProviderProps>(
// TODO: refactor this to be actually typesafe instead of casting
const LayoutDndContext = React.createContext<Omit<LayoutDndProviderProps, 'children'>>(
null as unknown as LayoutDndProviderProps
);

View File

@ -126,6 +126,7 @@ const ModalForm = ({ onMetaChange, onSizeChange }: ModalFormProps) => {
value={fieldForm?.size}
name="size"
onChange={(value) => {
// TODO: refactor this to be actually typesafe instead of casting
onSizeChange({ name: selectedField, value: value as number });
}}
label={formatMessage({