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 React, { Component } from 'react'; | |
import PropTypes from 'prop-types'; | |
import componentQueries from 'react-component-queries'; | |
import { connect } from 'react-redux'; | |
import { connectProcesses } from 'redux-saga-process'; | |
import _ from 'lodash'; |
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
// @flow | |
import ModuleFilenameHelpers from 'webpack/lib/ModuleFilenameHelpers'; | |
import type { | |
FormatConfig, | |
PluginConfigurationType, | |
UserPluginConfigurationType, | |
} from './types'; | |
import path from 'path'; |
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
/* @flow */ | |
import PromiseQueue from 'promise-queue-observable'; | |
import { config as AWSConfig, CognitoIdentityCredentials, CognitoSyncManager } from 'aws-sdk'; | |
import 'amazon-cognito-js'; | |
import { | |
CognitoUserPool, | |
CognitoUser, | |
AuthenticationDetails, |
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 REACT_PROTOTYPE = [ | |
'constructor', | |
'autobind', | |
'childContextTypes', | |
'componentDidMount', | |
'componentDidUpdate', | |
'componentWillMount', | |
'componentDidCatch', | |
'componentWillReceiveProps', | |
'componentWillUnmount', |
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 * as React from 'react'; | |
import hoistMethods from 'hoist-non-react-methods'; | |
const METHODS = { | |
set(timeoutID, fn, delay) { | |
METHODS.delete.call(this, timeoutID); | |
const cancelToken = setTimeout(() => { | |
METHODS.delete.call(this, timeoutID); | |
fn(); | |
}, delay); |
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
04623daa9b2fb27cb36375183ada46e4cdcebaf83bc1071608ac494a473439e4a55bda3dbe11f46868129dd87653c0f379117e31989efbdb8c2796ad245d3a6c53 |
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
/* | |
A Process allows us to define a modular "Logic Component" which may | |
interact with our app in a variety of ways based on it's design. | |
Processes are given properties when configured which will define if/how | |
they reduce the redux state, what actions they make available to our | |
components, when our process should load and with what scope, | |
what types we want to listen for, and more. | |
This allows us to build truly encapsulated and re-useable application |
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 { Process } from 'redux-saga-process'; | |
import { call, put } from 'redux-saga/effects'; | |
import { createSelector } from 'reselect'; | |
import { createTaskManager } from 'saga-task-manager'; | |
import startUserPositionObserver from 'saga-geolocation-observer'; | |
import handleUserPosition from './sagas/handleUserPosition'; |
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 * as React from 'react'; | |
/* | |
Called to build our states schema. | |
*/ | |
const $ = StateManager({ | |
/* `config` to configure globally - passed to all state modules */ | |
config: {}, |
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
async function Event(req, res, data, callback) { | |
if (data.query.block) { | |
const prefix = data.query.block.split('_')[0]; | |
// If the parameter passed in starts with xrb_ or nano_, send them to an account search | |
if (prefix === 'xrb' || prefix === 'nano') { | |
res.writeHead(302, { Location: `/${data.params.lang}/explore/account/${data.query.block}` }); | |
} else { | |
res.writeHead(302, { Location: `/${data.params.lang}/explore/block/${data.query.block}` }); | |
} | |
return res.end(); |