Sha256: 0f298d324b7272683543fbb65d5ae1a241b57496966fc7350b83489853e293bb
Contents?: true
Size: 766 Bytes
Versions: 10
Compression:
Stored size: 766 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, undefined> { 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
10 entries across 10 versions & 2 rubygems