@emotion/core#CacheProvider TypeScript Examples

The following examples show how to use @emotion/core#CacheProvider. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AppContainer.tsx    From yasd with MIT License 6 votes vote down vote up
AppContainer: React.FC = ({ children }) => {
  return (
    <Suspense fallback={<div />}>
      <CacheProvider value={styleCache}>
        <ReactRouter>
          <ProfileProvider>
            <ThemeProvider theme={light}>
              <ModalProvider>{children}</ModalProvider>
            </ThemeProvider>
          </ProfileProvider>
        </ReactRouter>
      </CacheProvider>
    </Suspense>
  )
}
Example #2
Source File: _app.tsx    From condo with MIT License 5 votes vote down vote up
MyApp = ({ Component, pageProps }) => {
    const intl = useIntl()
    dayjs.locale(intl.locale)

    const LayoutComponent = Component.container || BaseLayout
    // TODO(Dimitreee): remove this mess later
    const HeaderAction = Component.headerAction
    const RequiredAccess = Component.requiredAccess || React.Fragment

    const {
        EndTrialSubscriptionReminderPopup,
        isEndTrialSubscriptionReminderPopupVisible,
    } = useEndTrialSubscriptionReminderPopup()

    return (
        <>
            <Head>
                <meta
                    name="viewport"
                    content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
                />
            </Head>
            <ConfigProvider locale={ANT_LOCALES[intl.locale] || ANT_DEFAULT_LOCALE} componentSize={'large'}>
                <CacheProvider value={cache}>
                    <GlobalStyle/>
                    <FocusContextProvider>
                        <TrackingProvider>
                            <OnBoardingProvider>
                                <SubscriptionProvider>
                                    <LayoutContextProvider>
                                        <LayoutComponent menuData={<MenuItems/>} headerAction={HeaderAction}>
                                            <RequiredAccess>
                                                <Component {...pageProps} />
                                                {
                                                    isEndTrialSubscriptionReminderPopupVisible && (
                                                        <EndTrialSubscriptionReminderPopup/>
                                                    )
                                                }
                                            </RequiredAccess>
                                        </LayoutComponent>
                                    </LayoutContextProvider>
                                </SubscriptionProvider>
                            </OnBoardingProvider>
                        </TrackingProvider>
                    </FocusContextProvider>
                    <GoogleAnalytics/>
                    <YandexMetrika/>
                </CacheProvider>
            </ConfigProvider>
            <JIRAServiceDeskWidget/>
        </>
    )
}