mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
apply new dataApi to initModal
This commit is contained in:
@@ -108,18 +108,22 @@ class InitModal extends React.Component {
|
|||||||
})
|
})
|
||||||
|
|
||||||
let defaultMarkdownNote = dataApi
|
let defaultMarkdownNote = dataApi
|
||||||
.createMarkdownNote(data.storage.key, data.storage.folders[0].key, {
|
.createNote(data.storage.key, {
|
||||||
|
type: 'MARKDOWN_NOTE',
|
||||||
|
folder: data.storage.folders[0].key,
|
||||||
title: 'Welcome to Boostnote :)',
|
title: 'Welcome to Boostnote :)',
|
||||||
content: '# Welcome to Boostnote :)\nThis is a markdown note.\n\nClick to edit this note.'
|
content: '# Welcome to Boostnote :)\nThis is a markdown note.\n\nClick to edit this note.'
|
||||||
})
|
})
|
||||||
.then((note) => {
|
.then((note) => {
|
||||||
store.dispatch({
|
store.dispatch({
|
||||||
type: 'CREATE_NOTE',
|
type: 'UPDATE_NOTE',
|
||||||
note: note
|
note: note
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
let defaultSnippetNote = dataApi
|
let defaultSnippetNote = dataApi
|
||||||
.createSnippetNote(data.storage.key, data.storage.folders[0].key, {
|
.createNote(data.storage.key, {
|
||||||
|
type: 'SNIPPET_NOTE',
|
||||||
|
folder: data.storage.folders[0].key,
|
||||||
title: 'Snippet note example',
|
title: 'Snippet note example',
|
||||||
description: 'Snippet note example\nYou can store a series of snippet as a single note like Gist.',
|
description: 'Snippet note example\nYou can store a series of snippet as a single note like Gist.',
|
||||||
snippets: [
|
snippets: [
|
||||||
@@ -137,7 +141,7 @@ class InitModal extends React.Component {
|
|||||||
})
|
})
|
||||||
.then((note) => {
|
.then((note) => {
|
||||||
store.dispatch({
|
store.dispatch({
|
||||||
type: 'CREATE_NOTE',
|
type: 'UPDATE_NOTE',
|
||||||
note: note
|
note: note
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user