@@ -3,7 +3,7 @@ import { gql, useMutation } from '@apollo/client';
3
3
import PropTypes from 'prop-types' ;
4
4
5
5
6
- const Project = ( { name, likes, projId , userId, username } ) => {
6
+ const Project = ( { name, likes, id , userId, username } ) => {
7
7
8
8
// IMPORTANT:
9
9
// 1) schema change projId => id to allows Apollo Client cache auto-update. Only works with 'id'
@@ -38,7 +38,7 @@ const Project = ({ name, likes, projId, userId, username }) => {
38
38
const myVar = {
39
39
variables :
40
40
{
41
- projId,
41
+ projId : id ,
42
42
likes : likes + 1 ,
43
43
} ,
44
44
} ;
@@ -58,7 +58,7 @@ const Project = ({ name, likes, projId, userId, username }) => {
58
58
const myVar = {
59
59
variables :
60
60
{
61
- projId,
61
+ projId : id ,
62
62
userId : currUserSSID ,
63
63
username : currUsername ,
64
64
} ,
@@ -84,7 +84,7 @@ const Project = ({ name, likes, projId, userId, username }) => {
84
84
// Variable validation using propTypes
85
85
Project . propTypes = {
86
86
name : PropTypes . string . isRequired ,
87
- projId : PropTypes . string . isRequired ,
87
+ id : PropTypes . string . isRequired ,
88
88
userId : PropTypes . string . isRequired ,
89
89
username : PropTypes . string . isRequired ,
90
90
likes : PropTypes . number . isRequired ,
0 commit comments