Fix missing autosizer types

This commit is contained in:
jeffvli 2023-07-29 10:56:19 -07:00
parent e618ac7590
commit 9f60769b65
3 changed files with 6 additions and 6 deletions

View File

@ -1,7 +1,7 @@
import { QueryKey, useQueryClient } from '@tanstack/react-query';
import { useCallback, useMemo } from 'react';
import { useSearchParams } from 'react-router-dom';
import AutoSizer from 'react-virtualized-auto-sizer';
import AutoSizer, { Size } from 'react-virtualized-auto-sizer';
import { ListOnScrollProps } from 'react-window';
import { controller } from '/@/renderer/api/controller';
import { queryKeys } from '/@/renderer/api/query-keys';
@ -211,7 +211,7 @@ export const AlbumListGridView = ({ gridRef, itemCount }: any) => {
return (
<VirtualGridAutoSizerContainer>
<AutoSizer>
{({ height, width }) => (
{({ height, width }: Size) => (
<VirtualInfiniteGrid
key={`album-list-${server?.id}-${display}`}
ref={gridRef}

View File

@ -1,6 +1,6 @@
import { QueryKey, useQueryClient } from '@tanstack/react-query';
import { MutableRefObject, useCallback, useMemo } from 'react';
import AutoSizer from 'react-virtualized-auto-sizer';
import AutoSizer, { Size } from 'react-virtualized-auto-sizer';
import { ListOnScrollProps } from 'react-window';
import { VirtualGridAutoSizerContainer } from '../../../components/virtual-grid/virtual-grid-wrapper';
import { useListStoreByKey } from '../../../store/list.store';
@ -147,7 +147,7 @@ export const AlbumArtistListGridView = ({ itemCount, gridRef }: AlbumArtistListG
return (
<VirtualGridAutoSizerContainer>
<AutoSizer>
{({ height, width }) => (
{({ height, width }: Size) => (
<VirtualInfiniteGrid
ref={gridRef}
cardRows={cardRows}

View File

@ -1,6 +1,6 @@
import { useQueryClient } from '@tanstack/react-query';
import { MutableRefObject, useCallback, useMemo } from 'react';
import AutoSizer from 'react-virtualized-auto-sizer';
import AutoSizer, { Size } from 'react-virtualized-auto-sizer';
import { ListOnScrollProps } from 'react-window';
import { useListContext } from '../../../context/list-context';
import { useListStoreActions } from '../../../store/list.store';
@ -129,7 +129,7 @@ export const PlaylistListGridView = ({ gridRef, itemCount }: PlaylistListGridVie
return (
<VirtualGridAutoSizerContainer>
<AutoSizer>
{({ height, width }) => (
{({ height, width }: Size) => (
<VirtualInfiniteGrid
key={`playlist-list-${server?.id}`}
ref={gridRef}