aboutsummaryrefslogtreecommitdiff
path: root/src/components/SolutionCard/SolutionCard.js
diff options
context:
space:
mode:
authorEugene <eug-vs@keemail.me>2020-01-12 15:08:34 +0000
committerGitHub <noreply@github.com>2020-01-12 15:08:34 +0000
commit23a5631531861ac76d532c0d9d2b19dd1862f739 (patch)
tree9c4c7e2c2255d8a7253f5bacebc149cde1dbc696 /src/components/SolutionCard/SolutionCard.js
parente78ecf560a0c6f4cf59a3c4341884996464c7923 (diff)
parentb5af9d633386e1e9139888cbe272ff4d34e6219b (diff)
downloadchrono-cube-ui-23a5631531861ac76d532c0d9d2b19dd1862f739.tar.gz
Merge pull request #31 from Eug-VS/scoreboard-requests
Improve requests logic on Scoreboard page
Diffstat (limited to 'src/components/SolutionCard/SolutionCard.js')
-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 (