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
| import { graphql } from 'react-apollo'; | |
| import gql from 'graphql-tag'; | |
| import { withForm } from './withForm'; | |
| import { AddTask } from '../ui/AddTask'; | |
| export const addTaskMutation = graphql( | |
| gql` | |
| mutation addTask($task: AddTaskInput!) { | |
| addTask(task: $task) { |
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
| import React, { Componente } from 'react'; | |
| import LikeButton from './likeButton'; | |
| import DeslikeButton from './deslikeButton'; | |
| class App extends Component { | |
| render () { | |
| return ( | |
| <div> | |
| <LikeButton /> |
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
| import React, { Component } from 'react'; | |
| import LikeButton from './likeButton'; | |
| import DeslikeButton from './deslikeButton'; | |
| class App extends Component { | |
| render () { | |
| return ( | |
| <div> | |
| <LikeButton /> |
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
| Para apagar o branch localmente: | |
| git branch -D <nome do branch> | |
| Para apagar o branch remotamente: | |
| git push <nome do origin> <nome do branch> --delete |
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
| // Add new todos | |
| import { Meteor } from 'meteor/meteor'; | |
| import { TasksCollection } from 'my/path/to/collections/TasksCollection'; | |
| Meteor.startup(function() { | |
| const data = JSON.parse(Assets.getText('csvjson.json')); // esta na pasta private do Meteor | |
| console.log(data.length); |
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
| import { Mongo } from 'meteor/mongo'; | |
| const tasksCollection = new Mongo.Collection('tasks'); | |
| Object.assign(tasksCollection, { | |
| add(task) { | |
| this.insert({ ...task })); | |
| }); |
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
| var copyTextareaBtn = document.querySelector('.js-textareacopybtn'); | |
| copyTextareaBtn.addEventListener('click', function(event) { | |
| var copyTextarea = document.querySelector('.js-copytextarea'); | |
| copyTextarea.focus(); | |
| copyTextarea.select(); | |
| try { | |
| var successful = document.execCommand('copy'); | |
| var msg = successful ? 'successful' : 'unsuccessful'; |