diff --git a/package-lock.json b/package-lock.json index 3e271269..82630ce1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "react-dom": "18.2.0", "react-easy-crop": "5.0.4", "swr": "2.2.4", - "virtua": "0.18.0" + "virtua": "0.20.5" }, "devDependencies": { "@fontsource/material-icons": "5.0.11", @@ -31882,9 +31882,9 @@ } }, "node_modules/virtua": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/virtua/-/virtua-0.18.0.tgz", - "integrity": "sha512-ztDBzTbzSluK//xvcXhCfjDbwkuBFSPD43ZO2SR5tNI46/BEb1oNBI/lu6CAE8MmlXr10ZdaFOdbm6LtC0hvlQ==", + "version": "0.20.5", + "resolved": "https://registry.npmjs.org/virtua/-/virtua-0.20.5.tgz", + "integrity": "sha512-GHL+kSTotf5L1x3/Wcir0KkNKxmQIdWiDrcrBNz+DMiLUdNtskKs+E76Z0SSeeL0+I/PFutBrI8fXw/j7N+6sQ==", "peerDependencies": { "react": ">=16.14.0", "react-dom": ">=16.14.0", diff --git a/package.json b/package.json index 6afd991b..07b03a15 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "react-dom": "18.2.0", "react-easy-crop": "5.0.4", "swr": "2.2.4", - "virtua": "0.18.0" + "virtua": "0.20.5" }, "devDependencies": { "@fontsource/material-icons": "5.0.11", diff --git a/src/app/(menu)/_components/timeline/Timeline.tsx b/src/app/(menu)/_components/timeline/Timeline.tsx index 557846dd..3520fa4f 100644 --- a/src/app/(menu)/_components/timeline/Timeline.tsx +++ b/src/app/(menu)/_components/timeline/Timeline.tsx @@ -6,7 +6,7 @@ import { CircularProgress } from '@mui/material'; import { UserPost } from '@cuculus/cuculus-api'; import { SWRTimelineResponse, TimelineData } from '@/libs/swr/timeline/types'; import Showmore from '@/app/(menu)/_components/timeline/layouts/Showmore'; -import { WVList } from 'virtua'; +import { WindowVirtualizer } from 'virtua'; // 投稿の件数をカウントする const lengthPost = (data: TimelineData) => { @@ -62,7 +62,7 @@ export default function Timeline({ timeline }: Props) { return ( <> - { const count = data?.reduce((accumulator, item) => { @@ -100,7 +100,7 @@ export default function Timeline({ timeline }: Props) { ); } })} - + ); }