chore: upgrade to react 19
This commit is contained in:
@@ -97,7 +97,7 @@ export const EditorViewer = <T extends Language>(props: Props<T>) => {
|
||||
onClose,
|
||||
} = props;
|
||||
|
||||
const editorRef = useRef<monaco.editor.IStandaloneCodeEditor>();
|
||||
const editorRef = useRef<monaco.editor.IStandaloneCodeEditor>(undefined);
|
||||
const prevData = useRef<string | undefined>("");
|
||||
const currData = useRef<string | undefined>("");
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ export const FileInput = (props: Props) => {
|
||||
|
||||
const { t } = useTranslation();
|
||||
// file input
|
||||
const inputRef = useRef<any>();
|
||||
const inputRef = useRef<any>(undefined);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [fileName, setFileName] = useState("");
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ const LetterItem = memo(
|
||||
top: 0,
|
||||
right: 0,
|
||||
});
|
||||
const hoverTimeoutRef = useRef<ReturnType<typeof setTimeout>>();
|
||||
const hoverTimeoutRef = useRef<ReturnType<typeof setTimeout>>(undefined);
|
||||
|
||||
const updateTooltipPosition = useCallback(() => {
|
||||
if (!letterRef.current) return;
|
||||
|
||||
@@ -29,13 +29,13 @@ export function GuardState<T>(props: Props<T>) {
|
||||
const lockRef = useRef(false);
|
||||
const saveRef = useRef(value);
|
||||
const lastRef = useRef(0);
|
||||
const timeRef = useRef<any>();
|
||||
const timeRef = useRef<any>(undefined);
|
||||
|
||||
if (!isValidElement(children)) {
|
||||
return children as any;
|
||||
}
|
||||
|
||||
const childProps = { ...children.props };
|
||||
const childProps = { ...(children.props as Record<string, any>) };
|
||||
|
||||
childProps[valueProps] = value;
|
||||
childProps[onChangeProps] = async (...args: any[]) => {
|
||||
|
||||
Reference in New Issue
Block a user