Skip to content

Commit 9f2a207

Browse files
committed
for sharing with Shana
1 parent 2a6051c commit 9f2a207

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

app/src/Dashboard/Project.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { gql, useMutation } from '@apollo/client';
33
import PropTypes from 'prop-types';
44

55

6-
const Project = ({ name, likes, projId, userId, username }) => {
6+
const Project = ({ name, likes, id, userId, username }) => {
77

88
// IMPORTANT:
99
// 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 }) => {
3838
const myVar = {
3939
variables:
4040
{
41-
projId,
41+
projId: id,
4242
likes: likes + 1,
4343
},
4444
};
@@ -58,7 +58,7 @@ const Project = ({ name, likes, projId, userId, username }) => {
5858
const myVar = {
5959
variables:
6060
{
61-
projId,
61+
projId: id,
6262
userId: currUserSSID,
6363
username: currUsername,
6464
},
@@ -84,7 +84,7 @@ const Project = ({ name, likes, projId, userId, username }) => {
8484
// Variable validation using propTypes
8585
Project.propTypes = {
8686
name: PropTypes.string.isRequired,
87-
projId: PropTypes.string.isRequired,
87+
id: PropTypes.string.isRequired,
8888
userId: PropTypes.string.isRequired,
8989
username: PropTypes.string.isRequired,
9090
likes: PropTypes.number.isRequired,

app/src/Dashboard/ProjectContainer.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const ProjectContainer = () => {
4242
likes = {proj.likes}
4343
userId = {proj.userId}
4444
username = {proj.username}
45-
projId = {proj.id}
45+
id = {proj.id}
4646
/>);
4747

4848
return (

0 commit comments

Comments
 (0)