aboutsummaryrefslogtreecommitdiff
path: root/src/components/SolutionCard
diff options
context:
space:
mode:
authorEug-VS <eug-vs@keemail.me>2020-01-07 22:48:20 +0300
committerEug-VS <eug-vs@keemail.me>2020-01-07 22:48:20 +0300
commitb5af9d633386e1e9139888cbe272ff4d34e6219b (patch)
tree8af2f6425aa1466ee36dce452bb0a2f0ef4c7f0f /src/components/SolutionCard
parent4931f205e1250c649b3a48b96a7823a9d52615ff (diff)
downloadchrono-cube-ui-b5af9d633386e1e9139888cbe272ff4d34e6219b.tar.gz
Improve updating and deleting on Scoreboard page
Diffstat (limited to 'src/components/SolutionCard')
-rw-r--r--src/components/SolutionCard/SolutionCard.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/components/SolutionCard/SolutionCard.js b/src/components/SolutionCard/SolutionCard.js
index 7cca74c..1fff873 100644
--- a/src/components/SolutionCard/SolutionCard.js
+++ b/src/components/SolutionCard/SolutionCard.js
@@ -54,9 +54,10 @@ const SolutionCard = ({ data, removeThisCard }) => {
};
const handleDelete = () => {
- del(`solutions/${data.id}/`);
+ del(`solutions/${data.id}/`).then(() => {
+ removeThisCard(data.id);
+ });
handleClose();
- removeThisCard(data.id);
};
return (