Fix big grid crashing due to missing React import

by fixing the cause rather than the symptom: this upgrades the code to use the new, recommended JSX transform mode of React 17+, which no longer requires you to import React manually just to write JSX.
This commit is contained in:
Robin Townsend
2023-06-30 18:21:18 -04:00
parent ae804d60d0
commit 17450b4531
68 changed files with 600 additions and 329 deletions

View File

@@ -15,7 +15,7 @@ limitations under the License.
*/
import { useObjectRef } from "@react-aria/utils";
import React, { AllHTMLAttributes, useEffect } from "react";
import { AllHTMLAttributes, ChangeEvent, useEffect } from "react";
import { useCallback } from "react";
import { useState } from "react";
import { forwardRef } from "react";
@@ -51,7 +51,7 @@ export const AvatarInputField = forwardRef<HTMLInputElement, Props>(
const currentInput = fileInputRef.current;
const onChange = (e: Event) => {
const inputEvent = e as unknown as React.ChangeEvent<HTMLInputElement>;
const inputEvent = e as unknown as ChangeEvent<HTMLInputElement>;
if (inputEvent.target.files.length > 0) {
setObjUrl(URL.createObjectURL(inputEvent.target.files[0]));
setRemoved(false);