Sha256: 0c6e211f9029eff43423065422b9c9b307bd7428bb363c0c873e3c3a44488122
Contents?: true
Size: 755 Bytes
Versions: 42
Compression:
Stored size: 755 Bytes
Contents
import * as moment from "moment"; import * as React from "react"; import { ApolloProvider } from "react-apollo"; import apolloClient from "./apollo_client"; const { I18n } = require("react-i18nify"); interface ApplicationProps { locale: string; } /** * Wrapper component for all React applications using Apollo * @class * @augments Component */ export default class Application extends React.Component<ApplicationProps> { constructor(props: ApplicationProps) { const { locale } = props; I18n.setLocale(locale); moment.locale(locale); super(props); } public render() { const { children } = this.props; return ( <ApolloProvider client={apolloClient}> {children} </ApolloProvider> ); } }
Version data entries
42 entries across 42 versions & 2 rubygems