remove list jitter by initially preferring ssr
This commit is contained in:
parent
eeaf6e10e5
commit
90f4d41fc8
@ -8,19 +8,21 @@ import { CommentFlat } from './comment'
|
||||
import { SUB_ITEMS } from '../fragments/subs'
|
||||
import { LIMIT } from '../lib/cursor'
|
||||
import ItemFull from './item-full'
|
||||
import { useData } from './use-data'
|
||||
|
||||
export default function Items ({ ssrData, variables = {}, query, destructureData, rank, noMoreText, Footer, filter = () => true }) {
|
||||
const { data, fetchMore } = useQuery(query || SUB_ITEMS, { variables })
|
||||
const Foooter = Footer || MoreFooter
|
||||
const dat = useData(data, ssrData)
|
||||
|
||||
const { items, pins, cursor } = useMemo(() => {
|
||||
if (!data && !ssrData) return {}
|
||||