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 { Alert } from 'react-native'; | |
// An alert implementation that returns a promise when the choise is done | |
export const AlertAsync = ( | |
title, | |
message, | |
buttons = [], | |
options = {}, | |
type, | |
) => { |
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'; | |
// Permit to create a provider/consumer but allow the consumer | |
// to also receive a setter to update the provider value | |
export const createUpdatableContext = () => { | |
const { Provider, Consumer } = React.createContext(null); | |
class UpdatableContextProvider extends React.Component { | |
constructor(props) { | |
super(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
import React from 'react'; | |
import { AppLoading } from 'expo'; | |
import { Centered } from 'common/components/utils/Layout'; | |
import { BaseText } from 'common/styleguide/texts'; | |
import SimpleButton from 'common/components/buttons/SimpleButton'; | |
import CustomSafeAreaView from 'common/components/utils/CustomSafeAreaView'; | |
import { reportError } from 'AppSentry'; | |
const TechnicalErrorScreen = ({ onRetry }) => ( | |
<CustomSafeAreaView> |
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 {View} from "glamorous-native"; | |
import * as Colors from "colors"; | |
import {getColor} from "colors"; | |
import { greyD } from "colors"; | |
const Separator = ({ |
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 injectFiltersAPI = Comp => { | |
class FiltersAPIInjector extends React.Component { | |
constructor() { | |
super(); | |
this.filtersAPI = { | |
getFilters: this.getFilters, | |
setFilters: this.setFilters, | |
deleteFilters: this.deleteFilters, |
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 {InteractionManager, ActivityIndicator} from 'react-native'; | |
import {View} from 'glamorous-native'; | |
const DefaultLoader = ( | |
<View padding={20} alignItems="center" justifyContent="center"> | |
<ActivityIndicator size="large"/> | |
</View> | |
); |
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
✘-127 ~/Desktop/Stample-react-clone [master|✔] | |
16:25 $ ./node_modules/.bin/now build --config zeit.json --alias frontend-prod.stample.co | |
Deprecated! The option --alias will be removed soon. | |
Read more about the new way here: http://bit.ly/2l2v5Fg | |
> Deploying ~/Desktop/Stample-react-clone/build | |
> Using Node.js 7.6.0 (default) | |
> Ready! https://stample-front-sbonzcnqdg.now.sh (copied to clipboard) [2s] | |
> Initializing… |
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
✔ ~/Desktop/Stample-react-clone [master|✔] | |
16:17 $ npm run deploy-prod-all | |
> Stample@0.0.4 deploy-prod-all /Users/sebastienlorber/Desktop/Stample-react-clone | |
> now build --config zeit.json --alias frontend-prod.stample.co | |
Deprecated! The option --alias will be removed soon. | |
Read more about the new way here: http://bit.ly/2l2v5Fg | |
> Deploying ~/Desktop/Stample-react-clone/build |
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
// Logs all calls to preventDefault / stopPropagation in an user-friendly way | |
if ( process.env.NODE_ENV !== "production" ) { | |
(function monkeyPatchEventMethods() { | |
const logEventMethodCall = (event,methodName) => { | |
const MinimumMeaninfulSelectors = 3; // how much meaningful items we want in log message | |
const target = event.target; | |
const selector = (function computeSelector() { |
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
{ | |
"id":"2595a67d11894c1c8c2ab6131663c6e9", | |
"project":38297, | |
"release":"20/01/2017 13:27", | |
"platform":"javascript", | |
"culprit":"raven-js/src/raven in func", | |
"message":"TypeError plugin.setSuspendState is not a function raven-js/src/raven in func", | |
"datetime":"2017-01-23T09:55:11.000000Z", | |
"time_spent":null, | |
"tags":[ |