Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bicstone committed Jun 16, 2023
1 parent ee7a83b commit 0f60805
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/features/Timeline/TimelineList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,14 @@ export const TimelineList = ({
if (virtualized) {
return (
<VirtuosoGrid
useWindowScroll
data={flatNodes}
components={{
List: Container,
}}
itemContent={(index, item) => <TimelineItem key={index} item={item} />}
overscan={10}
style={{ height: "100%" }}
useWindowScroll
/>
);
}
Expand Down
6 changes: 5 additions & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ const IndexPage = ({ data }: PageProps<IndexPageQuery>): JSX.Element => {
<Container
maxWidth="md"
fixed
css={(theme) => ({ margin: theme.spacing(4, "auto") })}
css={(theme) => ({
margin: theme.spacing(4, "auto"),
// prevent flickering caused by virtual scrolling
minHeight: "200vh",
})}
>
<BioCardList />
<Spacer y={6} />
Expand Down

0 comments on commit 0f60805

Please sign in to comment.