Skip to content

Commit

Permalink
Fix Backup Error
Browse files Browse the repository at this point in the history
  • Loading branch information
AnOldStory committed Mar 20, 2020
1 parent 9f1f185 commit 2c7f44d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Binary file modified STOREIMG/제목 없음.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/container/editor/EditorContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class EditorContainer extends Component {
<div className="option">
<div className="block-name">추가 옵션</div>
<label className="options">
Latest Jquery 자동 추가:
Latest jQuery 자동 추가:
<input
type="checkbox"
checked={this.state.jquery}
Expand Down
9 changes: 8 additions & 1 deletion src/container/main/MainContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class MainContainer extends Component {

Upload(e) {
let fileReader = new FileReader();
console.log(fileReader.readyState);
fileReader.onload = () => {
if (this.Validation(fileReader.result)) {
let result = JSON.parse(fileReader.result);
Expand All @@ -59,6 +60,9 @@ class MainContainer extends Component {

this.Save(key, nickname, url, code, jquery);
}
this.setState({
err: ""
});
});
});
} else {
Expand Down Expand Up @@ -127,7 +131,10 @@ class MainContainer extends Component {

<div className="big big-btn">
<a
href={"data:text/json," + JSON.stringify(this.props.storageList)}
href={
"data:text/json," +
encodeURIComponent(JSON.stringify(this.props.storageList))
}
className="btn"
download="backup.json"
>
Expand Down

0 comments on commit 2c7f44d

Please sign in to comment.