diff --git a/sites/org/freesewing.config.js b/sites/org/freesewing.config.js index b55ab2f0480..adee0fda0a1 100644 --- a/sites/org/freesewing.config.js +++ b/sites/org/freesewing.config.js @@ -4,6 +4,9 @@ export const freeSewingConfig = { index: 'canary_freesewing.dev', key: '589c7a7e4d9c95a4f12868581259bf3a', // Search-only API key }, + bugsnag: { + key: '1b3a900d6ebbfd071975e39b534e1ff5', + }, monorepo: 'https://github.com/freesewing/freesewing', maxWidth: 2800, } diff --git a/sites/org/pages/_app.js b/sites/org/pages/_app.js index e4f36c958a5..261ae28a4c7 100644 --- a/sites/org/pages/_app.js +++ b/sites/org/pages/_app.js @@ -3,10 +3,10 @@ import { appWithTranslation } from 'next-i18next' import React from 'react' import Bugsnag from '@bugsnag/js' import BugsnagPluginReact from '@bugsnag/plugin-react' -import process from 'process' +import { freeSewingConfig } from 'site/freesewing.config.js' Bugsnag.start({ - apiKey: process.env.BUGSNAG_API_KEY, + apiKey: freeSewingConfig.bugsnag.key, collectUserIp: false, plugins: [new BugsnagPluginReact()], }) diff --git a/sites/org/pages/docs/[...mdxslug].js b/sites/org/pages/docs/[...mdxslug].js index 7983ab4dd49..290c06072b9 100644 --- a/sites/org/pages/docs/[...mdxslug].js +++ b/sites/org/pages/docs/[...mdxslug].js @@ -12,7 +12,7 @@ import mdxPaths from 'site/prebuild/mdx.paths.js' const MdxPage = (props) => { // This hook is used for shared code and global state - const app = useApp() + const app = useApp(props) /* * Each page should be wrapped in the Page wrapper component diff --git a/sites/org/pages/docs/index.js b/sites/org/pages/docs/index.js index 15359cb19d0..f34e5174e3d 100644 --- a/sites/org/pages/docs/index.js +++ b/sites/org/pages/docs/index.js @@ -5,8 +5,8 @@ import MdxWrapper from 'shared/components/wrappers/mdx' import ReadMore from 'shared/components/mdx/read-more.js' import { jargon } from 'site/jargon.mjs' -const DocsPage = ({ title, mdx }) => { - const app = useApp() +const DocsPage = ({ title, mdx, bugsnag }) => { + const app = useApp({ bugsnag }) // We don't need all MDX components here, just ReadMore const components = { diff --git a/sites/org/pages/index.js b/sites/org/pages/index.js index 5b119c68eae..b13317d523b 100644 --- a/sites/org/pages/index.js +++ b/sites/org/pages/index.js @@ -6,8 +6,8 @@ import { serverSideTranslations } from 'next-i18next/serverSideTranslations' import Layout from 'site/components/layouts/bare' import PageLink from 'shared/components/page-link' -const HomePage = () => { - const app = useApp() +const HomePage = (props) => { + const app = useApp(props) // Not using translation for now // const { t } = useTranslation(['homepage', 'ograph']) diff --git a/sites/org/pages/signin/index.js b/sites/org/pages/signin/index.js index b07cff8cdbd..8879c479521 100644 --- a/sites/org/pages/signin/index.js +++ b/sites/org/pages/signin/index.js @@ -10,8 +10,8 @@ import SusiWrapper from 'site/components/wrappers/susi.js' const darkLinkClasses = 'decoration-1 underline text-medium font-medium hover:decoration-2' -const SignInPage = () => { - const app = useApp() +const SignInPage = (props) => { + const app = useApp(props) const { t } = useTranslation(['suli']) const [username, setUsername] = useState('') diff --git a/sites/org/pages/typography.js b/sites/org/pages/typography.js index 6196eb6665b..28767bdc203 100644 --- a/sites/org/pages/typography.js +++ b/sites/org/pages/typography.js @@ -2,8 +2,8 @@ import Page from 'site/components/wrappers/page.js' import useApp from 'site/hooks/useApp.js' import Popout from 'shared/components/popout.js' -const TypographyPage = () => { - const app = useApp() +const TypographyPage = (props) => { + const app = useApp(props) const p = (

diff --git a/sites/shared/backend.mjs b/sites/shared/backend.mjs index 73501e9fe96..fb2fe0a35bb 100644 --- a/sites/shared/backend.mjs +++ b/sites/shared/backend.mjs @@ -1,5 +1,5 @@ import axios from 'axios' -import process from 'node:process' +import process from 'process' /* * Helper methods to interact with the FreeSewing backend diff --git a/sites/shared/prebuild/index.mjs b/sites/shared/prebuild/index.mjs index 21bc54be6c3..baeaa6e8276 100644 --- a/sites/shared/prebuild/index.mjs +++ b/sites/shared/prebuild/index.mjs @@ -1,5 +1,5 @@ import { prebuildMdx } from './mdx.mjs' -//import { prebuildStrapi } from './strapi.mjs' +import { prebuildStrapi } from './strapi.mjs' import { prebuildNavigation } from './navigation.mjs' import { prebuildContributors } from './contributors.mjs' import { prebuildPatrons } from './patrons.mjs' @@ -11,9 +11,9 @@ const run = async () => { console.log('in run') const SITE = process.env.SITE || 'lab' if (SITE === 'org') { - //const mdxPages = await prebuildMdx(SITE) - //const [posts] = await prebuildStrapi(SITE) - //prebuildNavigation(mdxPages, posts, SITE) + const mdxPages = await prebuildMdx(SITE) + const [posts] = await prebuildStrapi(SITE) + prebuildNavigation(mdxPages, posts, SITE) } else if (SITE === 'dev') { const mdxPages = await prebuildMdx(SITE) if (process.env.GENERATE_OG_IMAGES) {