From 4ae14f54354cd600cab1ea7b5ea12194a79f7f6f Mon Sep 17 00:00:00 2001 From: Rutik Wankhade Date: Sun, 13 Oct 2024 12:41:02 +0530 Subject: [PATCH 1/2] fix: keep custom icon option as first in icons --- src/components/Editor.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Editor.js b/src/components/Editor.js index 7a93d03..5796605 100644 --- a/src/components/Editor.js +++ b/src/components/Editor.js @@ -34,7 +34,7 @@ class Editor extends React.Component { componentDidMount() { // console.log("Mount") fetch(devIconsUrl).then(r => r.json()).then(data => { - data.push({ name: 'custom' }) + data.unshift({ name: 'upload your own' }) this.setState({ devIconOptions: data.map(item => ({ 'value': item.name, 'label': item.name })) }) }) } @@ -111,10 +111,10 @@ class Editor extends React.Component {
- {this.state.icon.label === 'custom' ? -
+ {this.state.icon.label === 'upload your own' ? +
this.setState({ 'customIcon': URL.createObjectURL(e.target.files[0]) })} />
From bbbf851673810d9f1afbfc009d0ec647e881a2d4 Mon Sep 17 00:00:00 2001 From: Rutik Wankhade Date: Sun, 13 Oct 2024 12:48:29 +0530 Subject: [PATCH 2/2] doc: fix readme preview image --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fb75d4e..0a42524 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Creating cover images for your blogs is now super easy. -