Skip to content

Commit

Permalink
SplashScreen: force update on storage clearance
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Aug 15, 2019
1 parent f641a8b commit c4c25c1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/SplashScreen.js
Expand Up @@ -24,6 +24,11 @@ export default class SplashScreen extends Component {
}
};

#clearSavedTemplate = () => {
lastSaveState.clear();
this.forceUpdate();
};

render() {
console.log("render");
const previousStateDate = lastSaveState.lastSaveDate();
Expand Down Expand Up @@ -76,7 +81,7 @@ export default class SplashScreen extends Component {
<br />
Make sure you have backup all the useful data.
</p>
<button onClick={lastSaveState.clear} type="button">
<button onClick={this.#clearSavedTemplate} type="button">
Delete saved version
</button>
</details>
Expand Down

0 comments on commit c4c25c1

Please sign in to comment.