Skip to content

Commit

Permalink
[templates/nextjs-styleguide] Ensure Bootstrap component is used in s…
Browse files Browse the repository at this point in the history
…tyleguide
  • Loading branch information
art-alexeyenko committed Jan 8, 2024
1 parent 7e5a3fd commit ce4911d
Showing 1 changed file with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Router from 'next/router';
import { I18nProvider } from 'next-localization';
import NProgress from 'nprogress';
import { SitecorePageProps } from 'lib/page-props';
import Bootstrap from 'src/Bootstrap';

// Using bootstrap and nprogress are completely optional.
// bootstrap is used here to provide a clean layout for samples, without needing extra CSS in the sample app
Expand All @@ -22,12 +23,17 @@ function App({ Component, pageProps }: AppProps<SitecorePageProps>): JSX.Element
const { dictionary, ...rest } = pageProps;

return (
// Use the next-localization (w/ rosetta) library to provide our translation dictionary to the app.
// Note Next.js does not (currently) provide anything for translation, only i18n routing.
// If your app is not multilingual, next-localization and references to it can be removed.
<I18nProvider lngDict={dictionary} locale={pageProps.locale}>
<Component {...rest} />
</I18nProvider>
<>
<Bootstrap {...pageProps} />
{/*
// Use the next-localization (w/ rosetta) library to provide our translation dictionary to the app.
// Note Next.js does not (currently) provide anything for translation, only i18n routing.
// If your app is not multilingual, next-localization and references to it can be removed.
*/}
<I18nProvider lngDict={dictionary} locale={pageProps.locale}>
<Component {...rest} />
</I18nProvider>
</>
);
}

Expand Down

0 comments on commit ce4911d

Please sign in to comment.