Last active
January 26, 2018 13:40
-
-
Save lmiller1990/c5fb0f095889836b5b91bbb54e4866dc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div> | |
| <CreatePostLayout @submit="handleCreatePost"> | |
| <CreateDescription | |
| slot="description" | |
| v-model="content" | |
| /> | |
| <SubmitButton | |
| slot="submit" | |
| :submitted="submitted" | |
| /> | |
| </CreatePostLayout> | |
| </div> | |
| </template> | |
| <script> | |
| import steem from 'steem' | |
| import CreatePostLayout from './CreatePostLayout' | |
| import CreateDescription from './CreateDescription' | |
| import SubmitButton from '@/components/shared/SubmitButton' | |
| export default { | |
| name: 'CreateContainer', | |
| components: { | |
| CreatePostLayout, | |
| CreateDescription, | |
| SubmitButton | |
| }, | |
| data () { | |
| return { | |
| content: '', | |
| submitted: false | |
| } | |
| }, | |
| created () { | |
| steem.api.setOptions({ url: 'https://api.steemit.com' }) | |
| }, | |
| methods: { | |
| handleCreatePost () { | |
| const key = 'your key here' | |
| steem.broadcast.comment( | |
| key, | |
| '', | |
| 'test', | |
| 'xenetics', | |
| 'instagram-clone-steem', | |
| 'A test post for creating a Instagram clone', | |
| 'This is a test post for a series about creating a Instgram like website on the Steem blockchain. More here: steemit.com/@xenetics', | |
| { tags: ['test', 'test-2', 'test-3'] }, | |
| (err, result) => { | |
| if (!err) { | |
| console.log('Result', result) | |
| } | |
| } | |
| ) | |
| } | |
| } | |
| } | |
| </script> | |
| <style scoped> | |
| </style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment