This file contains 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
const express = require('express') | |
const cry = require('thor-devkit/dist/cry') | |
const Transaction = require('thor-devkit/dist/transaction').Transaction | |
const app = express() | |
app.use(express.json()) | |
const port = 3000 | |
app.post('/', function(req, res) { |
This file contains 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
/** | |
* Attempt to commit a transaction to a contract. | |
* | |
* With a hefty wallet as "sponsor" + an empty wallet as "sender". | |
* | |
*/ | |
const fetch = require("node-fetch"); | |
const cry = require('thor-devkit/dist/cry') | |
const Transaction = require('thor-devkit/dist/transaction').Transaction |
This file contains 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
// TOP LEVEL IMPORTS | |
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
// ANTD | |
import Input from 'antd/lib/input'; | |
import 'antd/lib/input/style/css'; | |
import Icon from 'antd/lib/icon'; | |
import 'antd/lib/icon/style/css'; | |
// EXPORTED COMPONENT |
This file contains 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
const cheerio = require('cheerio'); | |
const request = require('request'); | |
request('https://www.cuantocabron.com/ultimos/p/1', (error, response, body) => { | |
// console.log('error:', error); // Print the error if one occurred | |
// console.log('statusCode:', response && response.statusCode); // Print the response status code if a response was received | |
// console.log('body:', body); // Print the HTML for the Google homepage. | |
const $ = cheerio.load(body) |
This file contains 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
//-------------------------------------------------------------------- | |
// COMPONENT DEFINITION: | |
//-------------------------------------------------------------------- | |
// See renderProps: https://www.youtube.com/watch?v=BcVAq3YFiuc | |
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
import { Query } from 'react-apollo'; | |
import Text from '../Components/Text'; | |
import CenteredActivityIndicator from '../Components/CenteredActivityIndicator'; |
This file contains 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
class CreateGameScreen extends React.Component { | |
this.state = { | |
curView: 'sportAndTime', | |
sport: '', | |
date: null, | |
time: null, | |
spotId: '', | |
description: '', | |
} |