Please can anyone help take a look a this code and tell me how I can fix it. This is my src/pages/articles/[...slug].astro file. I am pulling a single record from my Supabase DB that matches the slug parameter.
---
import { supabase } from "../../supabase";
const { slug } = Astro.params;
const res = await supabase.from("articles").select("*").eq('slug', slug)
const article = await res.data
if (!article) return Astro.redirect("/404");
console.log(slug)
console.log(article)
---
<html>
<head>
<title>{article.title}</title>
</head>
<body>
<h1>{article.title}</h1>
<p>{article.content}</p>
</body>
</html>