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 _ from 'lodash' | |
const logger = false | |
const consoleLog = (...args) => { | |
if (logger) { | |
console.log(...args) | |
} | |
} |
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
/// <reference types="cypress" /> | |
// *********************************************************** | |
// This example plugins/index.js can be used to load plugins | |
// | |
// You can change the location of this file or turn off loading | |
// the plugins file with the 'pluginsFile' configuration option. | |
// | |
// You can read more here: | |
// https://on.cypress.io/plugins-guide | |
// *********************************************************** |
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
export const schemaThirdStepPoll = Yup.object().shape<Partial<PollOrOssParams>>({ | |
questions: Yup.array() | |
.ensure() | |
.of( | |
// @ts-ignore | |
Yup.lazy<any>((item, options) => { | |
const itemIndex = options.parent.indexOf ? options.parent.indexOf(item) : -1; | |
let description = Yup.string().min(50); | |
if (itemIndex > 0) { |
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 ReactSelect, { Props } from 'react-select' | |
import { customStyles, getTheme } from './styles' | |
import { ReactNode, useMemo } from 'react' | |
import { FormControl } from '../FormControl' | |
export const SelectRaw = (props: Props) => { | |
const theme = useMemo(() => getTheme(props.error), [props.error]) | |
return ( | |
<ReactSelect | |
classNamePrefix="react-select" |
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 { useEffect, useRef } from 'react' | |
import { isEqual } from 'lodash' | |
import { notice } from 'uikit' | |
import { handleFetchError } from 'utils/exceptions' | |
import { useSafeSetState } from './useSetState' | |
function usePrevious(value) { | |
const ref = useRef() | |
useEffect(() => { |
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
#!/bin/bash | |
# Generates git changelog grouped by day | |
# | |
# optional parameters | |
# -a, --author to filter by author | |
# -s, --since to select start date | |
# -u, --until to select end date | |
git-timesheet () { |
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
export const getElementById = q => Cypress.$(`#${q}`)[0] | |
export const getElementByName = q => Cypress.$(`[name="${q}"]`)[0] | |
export const getElement = q => getElementById(q) || getElementByName(q) | |
export const get = q => cy.get(`#${CSS.escape(q)}`) | |
export const uncheck = q => { | |
const checkbox = getElement(q) | |
if (checkbox && checkbox.checked) { |
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 from 'react' | |
import { BooleanValue } from 'react-values' | |
import { css } from 'emotion' | |
import { Button, ConfirmDialog } from 'uikit' | |
import validate from './validate' | |
const SaveButtonWithDialog = ({ disabled, onConfirm, handleSubmit }) => ( | |
<BooleanValue> |
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 { handleActions, createAction } from 'redux-actions' | |
import { createNamedWrapperReducer } from 'utils/reducers' | |
const prefix = 'fetch' | |
/** | |
* FLOWTYPES | |
*/ | |
export type Actions<Payload> = { |
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
hello |
NewerOlder