tangled
alpha
login
or
join now
finxol.io
/
portfolio
0
fork
atom
Personal site
staging.colinozanne.co.uk
portfolio
astro
0
fork
atom
overview
issues
pulls
pipelines
fix: replace prop with locale conditional for subtitle
finxol.io
4 months ago
e9d677a2
6d62d0fe
verified
This commit was signed with the committer's
known signature
.
finxol.io
SSH Key Fingerprint:
SHA256:olFE3asYdoBMScuJOt60UxXdJ0RFdGv5kVKrdOtIcPI=
+5
-8
1 changed file
expand all
collapse all
unified
split
src
layouts
Layout.astro
+5
-8
src/layouts/Layout.astro
···
7
7
import colinPng from "@/assets/img/colin.png";
8
8
import colinWebp from "@/assets/img/colin.webp";
9
9
10
10
-
// Define the props interface
11
11
-
interface Props {
12
12
-
subtitle: string;
13
13
-
}
14
14
-
15
15
-
// Destructure the prop
16
16
-
const { subtitle } = Astro.props;
17
17
-
18
10
const path = Astro.originPathname.replace(/\/(fr|en)\//, "/");
19
11
const locale = Astro.currentLocale;
12
12
+
13
13
+
const subtitle =
14
14
+
locale === "fr"
15
15
+
? "Étudiant M1 Informatique"
16
16
+
: "Master's Computer Science Student";
20
17
---
21
18
22
19
<!doctype html>