fix: replace prop with locale conditional for subtitle

finxol.io e9d677a2 6d62d0fe

verified
Changed files
+5 -8
src
layouts
+5 -8
src/layouts/Layout.astro
···
import colinPng from "@/assets/img/colin.png";
import colinWebp from "@/assets/img/colin.webp";
-
// Define the props interface
-
interface Props {
-
subtitle: string;
-
}
-
-
// Destructure the prop
-
const { subtitle } = Astro.props;
-
const path = Astro.originPathname.replace(/\/(fr|en)\//, "/");
const locale = Astro.currentLocale;
+
+
const subtitle =
+
locale === "fr"
+
? "Étudiant M1 Informatique"
+
: "Master's Computer Science Student";
---
<!doctype html>