import { useQuery } from '@apollo/client' import Item, { ItemSkeleton } from './item' import styles from './items.module.css' export default function Items ({ query, rank }) { const { loading, error, data } = useQuery(query) if (error) return
Failed to load!
if (loading) { const items = new Array(20).fill(null) return (
{items.map((_, i) => ( ))}
) } const { items } = data return (
{items.map((item, i) => ( ))}
) }