From ecb040a9062a84ada2d998265c87d89d9e52b02e Mon Sep 17 00:00:00 2001 From: KazooTTT Date: Mon, 10 Apr 2023 20:04:16 +0800 Subject: [PATCH] fix:reset and save the devIconOptions --- src/components/Editor.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/Editor.js b/src/components/Editor.js index 731fe07..ddb0058 100644 --- a/src/components/Editor.js +++ b/src/components/Editor.js @@ -31,7 +31,7 @@ const defaultSettings = { font: 'font-Anek', theme: 'background', customIcon: '', - platform: 'hashnode' + platform: 'hashnode' }; const devIconsUrl = "https://raw.githubusercontent.com/devicons/devicon/master/devicon.json" @@ -54,7 +54,10 @@ class Editor extends React.Component { }) } handleReset = () => { - this.setState(defaultSettings); + this.setState({ + ...defaultSettings, + devIconOptions: this.state.devIconOptions, + }); }; getRandomTheme = (theme, Pattern) => {