diff --git a/src/pages/SliceViewer.jsx b/src/pages/SliceViewer.jsx index ef04f3a1..c9a774d5 100644 --- a/src/pages/SliceViewer.jsx +++ b/src/pages/SliceViewer.jsx @@ -72,7 +72,13 @@ export default class SliceViewer extends Component { await deleteSlice(id); // toast message to users when the api call is successfully done. toast.success("Slice deleted successfully."); - window.location.reload(); + // change slice state to Dead. + this.setState(prevState => ({ + slice: { + ...prevState.slice, + "slice_state": "Dead" + } + })) } catch(ex) { console.log("failed to delete the slice: " + ex.response.data); toast.error("Failed to delete the slice.");