diff --git a/components/Masonry.tsx b/components/Masonry.tsx
index 5ceacf0..d9399b3 100644
--- a/components/Masonry.tsx
+++ b/components/Masonry.tsx
@@ -15,6 +15,16 @@ import { FloatButton } from 'antd'
import 'react-photo-album/masonry.css'
+function renderNextImage(
+ { alt = '', title, sizes }: RenderImageProps,
+ { photo }: RenderImageContext,
+ dataList: never[],
+) {
+ return (
+
+ );
+}
+
export default function Masonry(props : Readonly) {
const { data: pageTotal } = useSWRPageTotalHook(props)
const { data, error, isLoading, isValidating, size, setSize } = useSWRInfinite((index) => {
@@ -34,15 +44,6 @@ export default function Masonry(props : Readonly) {
(state) => state,
)
- function renderNextImage(
- { alt = '', title, sizes }: RenderImageProps,
- { photo }: RenderImageContext,
- ) {
- return (
-
- );
- }
-
useEffect(() => {
const fetchData = async (id: number) => {
try {
@@ -84,7 +85,7 @@ export default function Masonry(props : Readonly) {
...item
})) || []
}
- render={{ image: renderNextImage }}
+ render={{image: (...args) => renderNextImage(...args, dataList)}}
/>
{