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 REQUEST_TIMEOUT = 1000 * 20; | |
const COOKIE_EXPIRY_TIME = 1000 * 60 * 60 * 24 * 7; | |
const DEBOUNCE_PERIOD = 500; |
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 tp from 'timeproxy'; | |
const REQUEST_TIMEOUT = tp.TWENTY_SECONDS; | |
const COOKIE_EXPIRY_TIME = tp.A_WEEK; | |
const DEBOUNCE_PERIOD = tp.HALF_A_SECOND; |
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 tp from 'timeproxy'; | |
const TIME_UNTIL_NEXT_PUSH = tp.ONE_WEEK_AND_A_DAY; | |
const SHOW_DONT_LEAVE_DELAY = tp.TWELVE_MINUTES_TWO_SECONDS; | |
const WOW = tp.NINE_WEEKS_TWELVE_DAYS_SEVEN_MINUTES_AND_HALF_A_SECOND; |
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 tp from 'timeproxy'; | |
const SESSION_EXPIRES = tp.IN_THIRTY_SECONDS; | |
const OLD_POST_TIMESTAMP = tp.TWO_WEEKS_AGO; |
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 { FormValidation } from 'calidation'; | |
const config = { | |
username: { | |
isRequired: 'You need a username', | |
}, | |
email: { | |
isRequired: 'We need your email', | |
isEmail: 'We need a valid email, too', | |
}, |
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 tp from 'timeproxy'; | |
const REQUEST_TIMEOUT = tp`twenty seconds`; | |
const COOKIE_EXPIRY_TIME = tp`1 week`; | |
const DEBOUNCE_PERIOD = tp`.5 seconds`; |
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 tp from 'timeproxy'; | |
const TIME_UNTIL_NEXT_PUSH = tp`one week and a day`; | |
const SHOW_DONT_LEAVE_DELAY = tp`12 minutes 2 seconds`; | |
const WOW = tp`9 weeks twelve days and .5 seconds`; |
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 tp from 'timeproxy'; | |
const SESSION_EXPIRES = tp`in 30 seconds`; | |
const OLD_POST_TIMESTAMP = tp`two weeks ago` |
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 actions from '../actions'; | |
const getUser = () => async dispatch => { | |
dispatch(actions.getUserRequested()); | |
const response = await fetch('/api/user'); | |
const user = await response.json(); | |
dispatch(actions.getUserReceived(user); | |
}; | |
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 { connect } from 'react-redux'; | |
import * as dispatchers from '../dispatchers'; | |
class ProfilePage extends Component { | |
componentDidMount() { | |
this.props.getUser(); | |
} | |
render() {...} // Not really relevant here | |
} |