Upgrade to React 18

This commit is contained in:
Jamie Kyle
2025-04-29 13:27:33 -07:00
committed by GitHub
parent 560dcb91d9
commit 14d098f40f
46 changed files with 1210 additions and 1796 deletions

View File

@@ -1,5 +1,6 @@
// Copyright 2025 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import type { ChangeEvent } from 'react';
import React, { useCallback } from 'react';
import { VisuallyHidden } from 'react-aria';
import { getInteractionModality } from '@react-aria/interactions';
@@ -19,8 +20,8 @@ export function FunSearch(props: FunSearchProps): JSX.Element {
const { shouldAutoFocus, onChangeShouldAutoFocus } = useFunContext();
const handleChange = useCallback(
event => {
onSearchInputChange(event.target.value);
(event: ChangeEvent<HTMLInputElement>) => {
onSearchInputChange(event.currentTarget.value);
},
[onSearchInputChange]
);

View File

@@ -12,8 +12,8 @@ import React, {
useMemo,
useRef,
useState,
useId,
} from 'react';
import { useId } from 'react-aria';
import type { Selection } from 'react-aria-components';
import { ListBox, ListBoxItem } from 'react-aria-components';
import {

View File

@@ -3,9 +3,8 @@
import type { Transition } from 'framer-motion';
import { AnimatePresence, motion } from 'framer-motion';
import type { ReactNode } from 'react';
import React, { useCallback } from 'react';
import React, { useCallback, useId } from 'react';
import type { Key } from 'react-aria';
import { useId } from 'react-aria';
import { Tab, TabList, TabPanel, Tabs } from 'react-aria-components';
import type { FunPickerTabKey } from '../constants';