From f4ea0ec6b7c0799bddaa95460e675bfc44e8a358 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Sat, 3 Jun 2023 14:48:31 -0400 Subject: [PATCH] Fix astro error, (perhaps astro vscode integration bug?) --- src/pages/projects/[route].astro | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pages/projects/[route].astro b/src/pages/projects/[route].astro index fd9ff1d..f90de43 100644 --- a/src/pages/projects/[route].astro +++ b/src/pages/projects/[route].astro @@ -6,11 +6,13 @@ import Layout from "../../layouts/Layout.astro" import projects from "../../projects.json" export function getStaticPaths() { - return projects.map((project) => ({ params: { route: project.route } })) + return projects.map((project) => ({ + params: { route: project.route } + })) } -const { route } = Astro.params -const project = projects.find((project) => project.route === route) +const { route: projectRoute } = Astro.params +const project = projects.find((project) => project.route === projectRoute) if (project == null) return ---