Skip to content

Instantly share code, notes, and snippets.

View yantakus's full-sized avatar
🙏

Yan Takushevich yantakus

🙏
View GitHub Profile
'use strict';
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var options = {};
options.sass = {
errLogToConsole: true,
sourceMap: 'sass',
// These are the pages you can go to.
// They are all wrapped in the App component, which should contain the navbar etc
// See http://blog.mxstbr.com/2016/01/react-apps-with-pages for more information
// about the code splitting business
import { getAsyncInjectors } from 'utils/asyncInjectors'
const errorLoading = (err) => {
console.error('Dynamic page loading failed', err) // eslint-disable-line no-console
}
// @flow
// Rules on how to organize this file: https://github.com/erikras/ducks-modular-redux
import { fromJS } from 'immutable'
import { takeLatest } from 'redux-saga'
import { call, put, select } from 'redux-saga/effects'
import request, { authRequest } from 'utils/request'
import { API_URL, REQUESTED, SUCCEDED, FAILED } from '~/constants'
import type { Action, State } from 'types/common'
// @flow
import React from 'react'
import { Button } from 'react-formal'
import Spinner from 'components/Spinner'
type Props = {
messages: Object,
hint: string | HTMLElement,
text: string | HTMLElement,
import React from 'react'
import { shallow, render } from 'enzyme'
import AuthButton from '../AuthButton'
import Spinner from 'components/Spinner'
describe('<AuthButton />', () => {
it('should render <Spinner /> if `isLoading` prop is provided', () => {
const renderedComponent = shallow(
<AuthButton
text='Some text'
// @flow
/**
* Create the store with asynchronously loaded reducers
*/
import { createStore, applyMiddleware, compose } from 'redux'
import { Iterable, fromJS } from 'immutable'
import { routerMiddleware } from 'react-router-redux'
import createSagaMiddleware from 'redux-saga'
// @flow
import React, { Component } from 'react'
import Helmet from 'react-helmet'
import Auth from 'components/Auth'
import NoAccount from 'components/Auth/NoAccount'
import Form, { Field } from 'react-formal'
import Message from 'components/ValidationMessage'
import yup from 'yup'
import AuthButton from 'components/AuthButton'
const flatten = (array) =>
array.reduce((acc, cur) =>
acc.concat(Array.isArray(cur) ? flatten(cur) : cur), []);
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'i' ]
2 info using npm@6.14.4
3 info using node@v13.7.0
4 verbose npm-session 0c921c7a7b619650
5 silly install runPreinstallTopLevelLifecycles
6 silly preinstall graphql-auth@
7 info lifecycle graphql-auth@~preinstall: graphql-auth@
8 silly install loadCurrentTree
9 silly install readLocalPackageData
import { compact, isString, isEmpty } from 'lodash'
import { Currency } from 'generated'
type RangeUnit = {
[name: string]: {
value: string
inputLabel: string
viewLabel: string
}
}