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, useState, useCallback } from 'react'; | |
import { ApiSuccessfulResponse } from 'types/api'; | |
export default function useQuery<T>( | |
query: (params: string) => Promise<ApiSuccessfulResponse<T>>, | |
params: string | |
) { | |
const [isLoading, setLoading] = useState(true); | |
const [data, setData] = useState<T>(); | |
const [error, setError] = useState(); |
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
// ---- Styles | |
// Colors | |
$color-gold-100: #FEF9E1; | |
$color-gold-200: #FEF9E1; | |
$color-gold-300: #FEF9E1; | |
$color-gold-400: #FEF9E1; | |
$color-gold-500: #FEF9E1; | |
$color-gold-600: #FEF9E1; | |
$color-gold-700: #FEF9E1; | |
$color-gold-800: #FEF9E1; |
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 * as React from 'react'; | |
import { Timeline, Sidebar, EmptyStates } from 'pipestyle'; | |
import { t } from 'utils/I18n'; | |
import ActivityItem from './ActivityItem'; | |
import FakeActivities from './FakeActivities'; | |
export default class PipeActivities extends React.Component { | |
componentDidMount() { | |
this.props.subscribeToMore(); |
This file has been truncated, but you can view the full file.
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
[ | |
{ | |
"zip_code": 501, | |
"latitude": 40.922326, | |
"longitude": -72.637078, | |
"city": "Holtsville", | |
"state": "NY", | |
"county": "Suffolk" | |
}, | |
{ |
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
.declaration-order { | |
/* Positioning */ | |
position: absolute; | |
top: 0; | |
right: 0; | |
bottom: 0; | |
left: 0; | |
z-index: 10; | |
/* Box Model */ |
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 headerClass: string = | |
isCcMinimized & isBccMinimized & !isReplyingAll | |
? 'pp-both-min' | |
: isCcMinimized | isBccMinimized | |
? 'pp-one-min' | |
: ''; |
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
it('should have min class by default depending on props', () => { | |
props.isReplyingAll = true; | |
const wrapper = shallow(<ComposeEmailHeader {...props} />); | |
expect(wrapper.hasClass('pp-both-min')).toBeFalsy(); | |
expect(wrapper.hasClass('pp-one-min')).toBeTruthy(); | |
}); |
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
describe('Email badge', () => { | |
it('adds two email', () => { | |
const { container, getByTestId } = render(<EmailInput setTo={jest.fn()} {...props} />); | |
container.querySelector('input').value = 'example1@pipefy.com,'; | |
fireEvent.keyUp(container.querySelector('input'), { | |
key: 'Backspace', | |
}); | |
container.querySelector('input').value = 'example2@pipefy.com,'; |
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
setValues = (v: string): void => { | |
const lastChar = v.slice(-1); | |
const isComma = lastChar === ','; | |
const isSpace = lastChar === ' '; | |
if (isComma || isSpace) { | |
const delimiter = /,| /; | |
const notEmptyText = text => text.length > 0; | |
const emails = v | |
.slice(0, -1) |
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
{ | |
"zip_code": 501, | |
"latitude": 40.922326, | |
"longitude": -72.637078, | |
"city": "Holtsville", | |
"state": "NY", | |
"county": "Suffolk" | |
}, |
NewerOlder