File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import './App.css';
5
5
import graphql from 'babel-plugin-relay/macro' ;
6
6
import { QueryRenderer , fetchQuery } from 'react-relay' ;
7
7
import Posts from './Posts' ;
8
- import Post , { LoadingPost } from './Post' ;
8
+ import Post from './Post' ;
9
9
import { onegraphAuth } from './Environment' ;
10
10
import { Route , Link , Switch } from 'react-router-dom' ;
11
11
import idx from 'idx' ;
@@ -19,6 +19,7 @@ import UserContext from './UserContext';
19
19
20
20
import type { App_ViewerQueryResponse } from './__generated__/App_Query.graphql' ;
21
21
import type { Environment } from 'relay-runtime' ;
22
+ import type { RelayNetworkError } from 'react-relay' ;
22
23
23
24
const theme = {
24
25
global : {
@@ -43,7 +44,9 @@ const postsRootQuery = graphql`
43
44
}
44
45
` ;
45
46
46
- const ErrorBox = ( { error} ) => {
47
+ const ErrorBox = ( { error} : { error : Error } ) => {
48
+ console . log ( 'e' , error ) ;
49
+ // $FlowFixMe
47
50
const relayError = idx ( error , _ => _ . source . errors [ 0 ] . message ) ;
48
51
return (
49
52
< Box gap = "xsmall" justify = "center" align = "center" direction = "row" >
Original file line number Diff line number Diff line change @@ -279,7 +279,9 @@ const Post = ({relay, post}: Props) => {
279
279
< TippyGroup delay = { 500 } >
280
280
{ usedReactions . map ( g => {
281
281
const total = g . users . totalCount ;
282
- const reactors = g . users . nodes . map ( x => x . login ) ;
282
+ const reactors = ( g . users . nodes || [ ] ) . map ( x =>
283
+ x ? x . login : null ,
284
+ ) ;
283
285
if ( total > 11 ) {
284
286
reactors . push ( `${ total - 11 } more` ) ;
285
287
}
You can’t perform that action at this time.
0 commit comments