diff --git a/web/src/layouts/BaseLayout/BaseLayout.tsx b/web/src/layouts/BaseLayout/BaseLayout.tsx
index f0ab10b..9e3f72a 100644
--- a/web/src/layouts/BaseLayout/BaseLayout.tsx
+++ b/web/src/layouts/BaseLayout/BaseLayout.tsx
@@ -21,6 +21,16 @@ const BaseLayout = ({ children }: BaseLayoutProps) => {
<>
+
+
+
{children}
diff --git a/web/src/lib/sentry.ts b/web/src/lib/sentry.ts
index 339f829..dffc5d4 100644
--- a/web/src/lib/sentry.ts
+++ b/web/src/lib/sentry.ts
@@ -1,36 +1,35 @@
import * as Sentry from '@sentry/react'
-let dsn = ''
-let environment = 'development'
+function main() {
+ const SENTRY_DSN =
+ process.env.SENTRY_DSN ||
+ // HACK: Redwood+Netlify doesn't seem to be obeying our `includeEnvironmentVariables` setting
+ process.env.REDWOOD_ENV_SENTRY_DSN
-// HACK: I think this helps the build rewrite find the env var
-const SENTRY_DSN = process.env.SENTRY_DSN || process.env.REDWOOD_ENV_SENTRY_DSN
+ if (!SENTRY_DSN) {
+ console.error(
+ 'Missing SENTRY_DSN environment variable. Sentry is disabled for now.'
+ )
+ return
+ }
-console.log({ SENTRY_DSN, env: process.env })
+ const dsn = SENTRY_DSN
+ const environment = process.env.NODE_ENV
-if (typeof process === 'undefined' || !SENTRY_DSN) {
- console.error(
- 'Missing SENTRY_DSN environment variable. Did you forget to add it to ' +
- 'your redwood.toml file in `includeEnvironmentVariables`?'
- )
- console.info(`Copy this into your redwood.toml file:`)
- console.info(`
- includeEnvironmentVariables = [
- "SENTRY_DSN"
- ]
+ Sentry.init({
+ dsn,
+ environment,
+ integrations: [new Sentry.BrowserTracing()],
+ tracesSampleRate: 1.0,
+ })
- `)
- console.error('Sentry is disabled for now')
-} else {
- dsn = SENTRY_DSN
- environment = process.env.NODE_ENV
+ console.log('Sentry initialized', {
+ dsn,
+ environment,
+ processEnv: process.env,
+ })
}
-Sentry.init({
- dsn,
- environment,
- integrations: [new Sentry.BrowserTracing()],
- tracesSampleRate: 1.0,
-})
+main()
export default Sentry
diff --git a/web/src/pages/NewEventPage/NewEventPage.tsx b/web/src/pages/NewEventPage/NewEventPage.tsx
index bc3bf51..6161c96 100644
--- a/web/src/pages/NewEventPage/NewEventPage.tsx
+++ b/web/src/pages/NewEventPage/NewEventPage.tsx
@@ -89,10 +89,7 @@ const NewEventPage = () => {