Skip to content

Commit 56aff81

Browse files
authored
Merge pull request #2942 from pyth-network/cprussin/upgrade-react-aria
fix(component-library): upgrade react-aria and react-aria-components
2 parents adf227f + 2bc83e3 commit 56aff81

File tree

6 files changed

+1242
-990
lines changed

6 files changed

+1242
-990
lines changed

apps/insights/src/components/Root/search-button.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,17 +267,15 @@ const SearchDialogContents = ({
267267
className={styles.listbox ?? ""}
268268
// eslint-disable-next-line jsx-a11y/no-autofocus
269269
autoFocus={false}
270-
// @ts-expect-error looks like react-aria isn't exposing this
271-
// property in the typescript types correctly...
272270
shouldFocusOnHover
273-
emptyState={
271+
renderEmptyState={() => (
274272
<NoResults
275273
query={search}
276274
onClearSearch={() => {
277275
setSearch("");
278276
}}
279277
/>
280-
}
278+
)}
281279
>
282280
{(result) => (
283281
<ListBoxItem

packages/component-library/src/unstyled/ListBox/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const ListBoxItem = <T extends Element>({
1919
onHoverStart,
2020
...props
2121
}: ListBoxItemProps<T>) => {
22-
const prefetchProps = usePrefetch<T>({
22+
const prefetchProps = usePrefetch({
2323
href: props.href,
2424
prefetch,
2525
onHoverStart,

packages/component-library/src/unstyled/Table/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ export const Row = <T extends object>({
2424
onHoverStart,
2525
...props
2626
}: RowProps<T>) => {
27-
const prefetchProps = usePrefetch<HTMLTableRowElement>({
27+
const prefetchProps = usePrefetch({
2828
href: props.href,
2929
prefetch,
3030
onHoverStart,
31-
ref: ref,
31+
ref,
3232
});
3333

3434
return <BaseRow {...props} {...prefetchProps} />;

packages/component-library/src/unstyled/Tabs/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@ type TabProps = ComponentProps<typeof BaseTab> & {
1212
};
1313

1414
export const Tab = ({ ref, prefetch, onHoverStart, ...props }: TabProps) => {
15-
const prefetchProps = usePrefetch<HTMLAnchorElement>({
15+
const prefetchProps = usePrefetch({
1616
href: props.href,
1717
prefetch,
1818
onHoverStart,
19-
// TODO Figure this out...
20-
// @ts-expect-error It doesn't look like refs are getting passed through correctly...
2119
ref,
2220
});
2321

0 commit comments

Comments
 (0)