Skip to content

Instantly share code, notes, and snippets.

View hitchcockwill's full-sized avatar

Will Hitchcock hitchcockwill

View GitHub Profile
@hitchcockwill
hitchcockwill / component_dashboard.tsx
Last active June 11, 2019 14:27
Component Dashboard
import React from 'react';
import { Query, QueryResult } from 'react-apollo';
import styles from './dashboard-scene.module.scss';
import { ME_QUERY } from 'app/models/me/me-schema';
import { Me } from 'app/models/me/me-types';
interface Props {
data: {
me: Me;
};
@hitchcockwill
hitchcockwill / hoc_dashboard.tsx
Last active June 11, 2019 14:27
HOC Dashboard
import React from 'react';
import { graphql } from 'react-apollo';
import styles from './dashboard-scene.module.scss';
import { ME_QUERY } from 'app/models/me/me-schema';
import { Me } from 'app/models/me/me-types';
interface Props {
data: {
me: Me;
};
// app.tsx
import React, { Component } from 'react';
import { Provider } from 'react-redux';
// import Environment from 'app/components/environment';
import AppHeaderLayout from 'app/scenes/app-header-layout';
import DashboardScene from 'app/scenes/dashboard-scene';
import 'assets/styles/shared.scss';
import store from './store';
// app.tsx
import React, { Component } from 'react';
import { Provider } from 'react-redux';
import ApolloClient from 'apollo-client';
import { ApolloProvider } from 'react-apollo';
import { InMemoryCache } from 'apollo-cache-inmemory';
// import Environment from 'app/components/environment';
import AppHeaderLayout from 'app/scenes/app-header-layout';
import DashboardScene from 'app/scenes/dashboard-scene';
import 'assets/styles/shared.scss';
@hitchcockwill
hitchcockwill / GistsList.js
Created October 3, 2017 15:37
This is an actual description of a gist
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import Gist from './GistItem'
import './gistsList.css'
class GistsList extends Component {
static propTypes = {
activeGist: PropTypes.string,
gists: PropTypes.array,
username: PropTypes.string,
"Fare": {
"Type": "Published",
"Code": null,
"IsRefundable": false,
"Components": {
"BaseFare": {
"Money": {
"Amount": 4108.86,
"Currency": "USD",
"DisplayAmount": "USD 4,108.86"
Processing Api::AccountController#disable_auto_renew (for 127.0.0.1 at 2015-09-21 14:44:33) [PUT]
Parameters: {"controller"=>"api/account", "action"=>"disable_auto_renew"}
User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 1897)
ProMembership Load (0.2ms) SELECT * FROM `pro_memberships` WHERE (`pro_memberships`.user_id = 1897) LIMIT 1
RecurringPaymentsProfile Load (0.2ms) SELECT * FROM `recurring_payments_profiles` WHERE (`recurring_payments_profiles`.`id` = 186)
SQL (0.1ms) BEGIN
ProMembership Load (0.1ms) SELECT * FROM `pro_memberships` WHERE (`pro_memberships`.recurring_payments_profile_id = 186) LIMIT 1
ProMembership.before_save START Wed, 21 Oct 2015 20:40:59 UTC +00:00
ProMembership.before_save END Wed, 21 Oct 2015 20:40:59 UTC +00:00
ProMembership Update (0.2ms) UPDATE `pro_memberships` SET `recurring_payments_profile_id` = NULL WHERE `id` = 177