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 set = new Set() | |
if (typeof window !== 'undefined') { | |
window.addEventListener('scroll', () => { | |
Array.from(set).forEach(fn => fn()) | |
}) | |
} | |
class ItemsListCursorTracker extends Component { | |
constructor(props) { |
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 route = require('koa-route') | |
const request = require('request') | |
const got = require('got') | |
const { | |
UMBRA_APS_CLIENT_SECRET, | |
UMBRA_API_EXTERNALURL, | |
UMBRA_AUTH_URI, | |
} = process.env |
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
function hasNotOnlyTypePayloadAndMetaProps(node) { | |
return node.properties.some( | |
prop => | |
prop.key.name !== 'type' && | |
prop.key.name !== 'payload' && | |
prop.key.name !== 'meta', | |
) | |
} | |
function isReduxActionTypePropertyValue(value) { |
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 { Heading } from '../Heading/Heading' | |
import { TasksStatus } from '../TasksStatus/TasksStatus' | |
import { Section } from '../Section/Section' | |
import { VerticalStack } from '../VerticalStack/VerticalStack' | |
import { TasksGroupsList } from '../TasksGroupsList/TasksGroupsList' | |
import { TaskNodesList } from '../TaskNodesList/TaskNodesList' | |
import { |
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' | |
class Pure extends React.PureComponent { | |
render() { | |
return <div>1</div> | |
} | |
} | |
class Page extends React.Component { | |
render() { |
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
.root { | |
display: grid; | |
} | |
.gap10 { | |
grid-gap: 10px; | |
} | |
.gap20 { |
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 PropTypes from 'prop-types' | |
import withRouter from 'react-router-dom/es/withRouter' | |
class ScrollManager extends React.Component { | |
static propTypes = { | |
history: PropTypes.object.isRequired, | |
location: PropTypes.object.isRequired, | |
} |
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 propTypes = { | |
history: PropTypes.object.isRequired, | |
} | |
const NewProjectRoute = props => ( | |
<Subscribe | |
to={[ | |
OrganizationsContainer, | |
UserContainer, | |
UsersContainer, |
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 handlePasswordChange({ currentPassword, newPassword }) { | |
await this.props.userState.changePassword({ currentPassword, newPassword }) | |
this.props.messageState.add({ | |
type: 'ok', | |
text: 'Password changed.', | |
}) | |
} | |
async function handleUserUpdate({ firstName, lastName }) { | |
await this.props.userState.update({ firstName, lastName }) |