diff --git a/src/pages/Popup/Popup.jsx b/src/pages/Popup/Popup.jsx index 269246737..98a8b7f07 100644 --- a/src/pages/Popup/Popup.jsx +++ b/src/pages/Popup/Popup.jsx @@ -24,6 +24,7 @@ import AssignmentIcon from '@mui/icons-material/Assignment'; import DeleteIcon from '@mui/icons-material/Delete'; import GitHubIcon from '@mui/icons-material/GitHub'; import AccountTreeIcon from '@mui/icons-material/AccountTree'; +import DeleteSweepIcon from '@mui/icons-material/DeleteSweep'; import { ListItemSecondaryAction } from '@mui/material'; // helper functions @@ -84,6 +85,11 @@ class Popup extends Component { ); } + removeall() { + chrome.storage.sync.set({ data: [] }); + this.setState({ data: [] }); + } + handleSubmit(event) { alert('Saved the number of days for timer: ' + this.state.daysInput); chrome.storage.sync.set({ timerDays: this.state.daysInput }); @@ -183,13 +189,11 @@ class Popup extends Component { size="large" aria-label="delete" onClick={(e) => { - chrome.tabs.update({ - url: 'https://github.com/arch-org/mistake', - }); e.preventDefault(); + this.removeall(); }} > - +