diff --git a/astro.config.mjs b/astro.config.mjs index 0e37b3b..7f3c7be 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -6,6 +6,11 @@ export default defineConfig({ output: "server", adapter: cloudflare(), integrations: [react()], + server: { + middleware: { + onRequest: "./src/middleware.js", + }, + }, vite: { build: { sourcemap: false, diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 78720e1..0f9bfd4 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -1,7 +1,8 @@ --- import NavLink from '@components/nav/NavLink.astro'; -const { nav, updated } = Astro.props; +const { updated } = Astro.props; +const { nav } = Astro.locals; ---