Last analyzed e429694 3 months ago
Default analysis branch is
Currently analyzing run
Found non-null assertions JS-0339
Anti-pattern
7 months ago7 months old
Forbidden non-null assertion
22  })
23  
24  const pages = feedQuery.data?.pages
25  const suggestions = suggestionsQuery.data!.suggestions26  // observe ref element, if its entered the viewport, fetch next page
27  const handleObserver = useCallback(
28    (entries: any) => {
Forbidden non-null assertion
 9
10const DisplayPosts = ({ pages }: { pages: Pages }) => {
11  return (
12    <>{pages!.map(({ feed }) => feed.map((post: typeof feed[number]) => <PostCard key={post.id} post={post} />))}</>13  )
14}
15
Forbidden non-null assertion
55        <Popover.Dropdown p={0} sx={{ height: '222px', overflowY: 'auto' }}>
56          {searchResult?.searchResult?.length! > 0 ? (
57            searchResult?.searchResult?.map((user) => (
58              <Group p={'0.5rem'} key={user!.id} sx={{ borderBottom: '1px solid lightgray' }}>59                <AvatarName avatar={user?.avatar} name={user?.name} />
60              </Group>
61            ))
Forbidden non-null assertion
53          </Box>
54        </Popover.Target>
55        <Popover.Dropdown p={0} sx={{ height: '222px', overflowY: 'auto' }}>
56          {searchResult?.searchResult?.length! > 0 ? (57            searchResult?.searchResult?.map((user) => (
58              <Group p={'0.5rem'} key={user!.id} sx={{ borderBottom: '1px solid lightgray' }}>
59                <AvatarName avatar={user?.avatar} name={user?.name} />
24
25      utils.setQueryData(['post.get-post', { postId }], {
26        post: {
27          ...snapshot!.post,28          comments: [res.commentAdded, ...snapshot!.post.comments],
29        },
30      })