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
import jump from 'jump.js' | |
import React, { Component } from 'react' | |
function withAnchorScroll(WrappedComponent) { | |
return class ScrollToAnchors extends Component { | |
componentDidMount() { | |
const { location: { hash } } = this.props | |
if (hash) { | |
/* |
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
import { ApolloLink } from 'apollo-link' | |
import cache from 'client/cache' | |
import GET_TOKEN from 'queries/session' | |
const authLink = new ApolloLink((operation, forward) => { | |
const { session: { token } = {} } = cache.readQuery({ query: GET_TOKEN }) | |
const headers = {} |
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
Backbone.Subset = Backbone.Collection.extend({ | |
superset: null, | |
initialize: function(models, options){ | |
this.superset = options.superset || this.superset; | |
this.sieve = options.sieve || this.sieve; | |
if (!this.superset) throw new Error('Missing superset for Backbone.Subset'); | |
_.each(['add', 'remove', 'reset', 'change'], function(evt){ |