Skip to content

Commit

Permalink
typecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohan-cp committed Apr 17, 2024
1 parent 0e76dd4 commit 9ffa7c3
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions apps/web/src/components/Feed/FeedList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
WindowScroller,
} from 'react-virtualized';
import { MeasuredCellParent } from 'react-virtualized/dist/es/CellMeasurer';
import { FragmentRefs } from 'relay-runtime';

import FeedSuggestedProfileSection from '~/components/Feed/FeedSuggestedProfileSection';
import { FeedMode } from '~/components/Feed/types';
Expand Down Expand Up @@ -174,7 +175,7 @@ export default function FeedList({
<PostItem
onPotentialLayoutShift={handlePotentialLayoutShift}
index={index}
eventRef={content}
eventRef={content as FeedContentType}
key={content.dbid}
queryRef={query}
measure={measure}
Expand Down Expand Up @@ -206,7 +207,7 @@ export default function FeedList({
// to re-evaluate the height of the item to keep the virtualization good.
onPotentialLayoutShift={handlePotentialLayoutShift}
index={index}
eventRef={content}
eventRef={content as FeedContentType}
key={content.dbid}
queryRef={query}
feedMode={feedMode}
Expand Down Expand Up @@ -327,3 +328,12 @@ export default function FeedList({
}

const DEFAULT_ROW_HEIGHT = 100;

type FeedContentType = {
readonly __typename: string;
readonly dbid?: string | undefined;
readonly ' $fragmentSpreads': FragmentRefs<
'FeedEventItemWithErrorBoundaryFragment' | 'PostItemWithErrorBoundaryFragment'
>;
readonly ' $fragmentType': 'FeedListEventDataFragment';
};

0 comments on commit 9ffa7c3

Please sign in to comment.