@@ -51,24 +51,26 @@ const leaders = {
5151const projectKey = 'nest'
5252
5353const About = ( ) => {
54- const { data : projectMetadataResponse , error : projectMetadataRequestError } = useQuery (
55- GetProjectMetadataDocument ,
56- {
57- variables : { key : projectKey } ,
58- }
59- )
54+ const {
55+ data : projectMetadataResponse ,
56+ error : projectMetadataRequestError ,
57+ loading : projectMetadataLoading ,
58+ } = useQuery ( GetProjectMetadataDocument , {
59+ variables : { key : projectKey } ,
60+ } )
6061
61- const { data : topContributorsResponse , error : topContributorsRequestError } = useQuery (
62- GetTopContributorsDocument ,
63- {
64- variables : {
65- excludedUsernames : Object . keys ( leaders ) ,
66- hasFullName : true ,
67- key : projectKey ,
68- limit : 24 ,
69- } ,
70- }
71- )
62+ const {
63+ data : topContributorsResponse ,
64+ error : topContributorsRequestError ,
65+ loading : topContributorsLoading ,
66+ } = useQuery ( GetTopContributorsDocument , {
67+ variables : {
68+ excludedUsernames : Object . keys ( leaders ) ,
69+ hasFullName : true ,
70+ key : projectKey ,
71+ limit : 24 ,
72+ } ,
73+ } )
7274
7375 const { leadersData, isLoading : leadersLoading } = useLeadersData ( )
7476
@@ -95,12 +97,7 @@ const About = () => {
9597 }
9698 } , [ topContributorsResponse , topContributorsRequestError ] )
9799
98- const isLoading =
99- ! projectMetadataResponse ||
100- ! topContributorsResponse ||
101- ( projectMetadataRequestError && ! projectMetadata ) ||
102- ( topContributorsRequestError && ! topContributors ) ||
103- leadersLoading
100+ const isLoading = projectMetadataLoading || topContributorsLoading || leadersLoading
104101
105102 if ( isLoading ) {
106103 return < LoadingSpinner />
0 commit comments