mirror of
https://github.com/ClaytonWWilson/CS307-Team24.git
synced 2025-12-16 10:18:48 +00:00
integrated backend change, added pointer cursor
This commit is contained in:
parent
7976110e2b
commit
4e817c9647
@ -49,7 +49,7 @@ exports.deleteTopic = (req, res) => {
|
|||||||
new_following = doc.data().followedTopics;
|
new_following = doc.data().followedTopics;
|
||||||
// remove username from array
|
// remove username from array
|
||||||
new_following.forEach(function(follower, index) {
|
new_following.forEach(function(follower, index) {
|
||||||
if (follower === `${req.body.topic}`) {
|
if (follower === `${req.body.unfollow}`) {
|
||||||
new_following.splice(index, 1);
|
new_following.splice(index, 1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -78,8 +78,11 @@ class user extends Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
handleDelete = topic => {
|
handleDelete = topic => {
|
||||||
|
console.log(topic);
|
||||||
axios
|
axios
|
||||||
.delete(`/deleteTopic/${topic.id}`)
|
.post(`/deleteTopic`, {
|
||||||
|
unfollow: topic
|
||||||
|
})
|
||||||
.then(function() {
|
.then(function() {
|
||||||
location.reload();
|
location.reload();
|
||||||
})
|
})
|
||||||
@ -91,7 +94,7 @@ class user extends Component {
|
|||||||
handleAddCircle = () => {
|
handleAddCircle = () => {
|
||||||
axios
|
axios
|
||||||
.post("/putTopic", {
|
.post("/putTopic", {
|
||||||
topic: this.state.newTopic
|
following: this.state.newTopic
|
||||||
})
|
})
|
||||||
.then(function() {
|
.then(function() {
|
||||||
location.reload();
|
location.reload();
|
||||||
@ -125,7 +128,7 @@ class user extends Component {
|
|||||||
axios
|
axios
|
||||||
.get("/getallPostsforUser")
|
.get("/getallPostsforUser")
|
||||||
.then(res => {
|
.then(res => {
|
||||||
console.log(res.data);
|
// console.log(res.data);
|
||||||
this.setState({
|
this.setState({
|
||||||
posts: res.data
|
posts: res.data
|
||||||
});
|
});
|
||||||
@ -269,6 +272,7 @@ class user extends Component {
|
|||||||
// iconStyle={classes.addCircle}
|
// iconStyle={classes.addCircle}
|
||||||
clickable
|
clickable
|
||||||
onClick={this.handleAddCircle}
|
onClick={this.handleAddCircle}
|
||||||
|
cursor="pointer"
|
||||||
/>
|
/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user