mirror of
https://github.com/strapi/strapi.git
synced 2025-12-29 08:04:51 +00:00
chore: apply review feedbacks and add refactoring todo
This commit is contained in:
parent
fe983aff15
commit
37b3dbf893
@ -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,
|
||||
|
||||
@ -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
|
||||
);
|
||||
|
||||
|
||||
@ -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({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user