File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
src/Repository/RepositoryItem Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -32,12 +32,12 @@ const updateWatch = (
3232 } ,
3333 } ,
3434) => {
35- const fragment = client . readFragment ( {
35+ const repository = client . readFragment ( {
3636 id : `Repository:${ id } ` ,
3737 fragment : REPOSITORY_FRAGMENT ,
3838 } ) ;
3939
40- let { totalCount } = fragment . watchers ;
40+ let { totalCount } = repository . watchers ;
4141 totalCount =
4242 viewerSubscription === VIEWER_SUBSCRIPTIONS . SUBSCRIBED
4343 ? totalCount + 1
@@ -47,9 +47,9 @@ const updateWatch = (
4747 id : `Repository:${ id } ` ,
4848 fragment : REPOSITORY_FRAGMENT ,
4949 data : {
50- ...fragment ,
50+ ...repository ,
5151 watchers : {
52- ...fragment . watchers ,
52+ ...repository . watchers ,
5353 totalCount,
5454 } ,
5555 } ,
@@ -78,18 +78,18 @@ const updateRemoveStar = (
7878} ;
7979
8080const getUpdatedStarData = ( client , id , viewerHasStarred ) => {
81- const fragment = client . readFragment ( {
81+ const repository = client . readFragment ( {
8282 id : `Repository:${ id } ` ,
8383 fragment : REPOSITORY_FRAGMENT ,
8484 } ) ;
8585
86- let { totalCount } = fragment . stargazers ;
86+ let { totalCount } = repository . stargazers ;
8787 totalCount = viewerHasStarred ? totalCount + 1 : totalCount - 1 ;
8888
8989 return {
90- ...fragment ,
90+ ...repository ,
9191 stargazers : {
92- ...fragment . stargazers ,
92+ ...repository . stargazers ,
9393 totalCount,
9494 } ,
9595 } ;
You can’t perform that action at this time.
0 commit comments