1
0
Fork 0

Fix InView creating div inside ul

Make it create li but only observe one of the skeleton instead
This commit is contained in:
Lim Chee Aun 2022-12-12 22:42:58 +08:00
parent 79f1b255d2
commit 3396aa2512

View file

@ -174,26 +174,26 @@ export default ({ hidden }) => {
); );
})} })}
{showMore && ( {showMore && (
<>
<InView <InView
as="li"
style={{
height: '20vh',
}}
onChange={(inView) => { onChange={(inView) => {
if (inView) loadStatuses(); if (inView) loadStatuses();
}} }}
>
<li
style={{
height: '25vh',
}}
> >
<Status skeleton /> <Status skeleton />
</li>
<li
style={{
height: '25vh',
}}
>
<Status skeleton />
</li>
</InView> </InView>
<li
style={{
height: '25vh',
}}
>
<Status skeleton />
</li>
</>
)} )}
</ul> </ul>
</> </>