This commit is contained in:
Avraham Sakal
2025-06-27 16:25:35 -04:00
parent 2a4ff2e509
commit 602ba72f75
18 changed files with 149 additions and 67 deletions
+3 -1
View File
@@ -10,7 +10,9 @@ export const data = async (pageContext: PageContextServer) => {
// https://vike.dev/useConfig
const config = useConfig();
const response = await fetch(`https://brillout.github.io/star-wars/api/films/${pageContext.routeParams.id}.json`);
const response = await fetch(
`https://brillout.github.io/star-wars/api/films/${pageContext.routeParams.id}.json`,
);
let movie = (await response.json()) as MovieDetails;
config({
+5 -1
View File
@@ -14,7 +14,11 @@ export default function Page() {
))}
</ol>
<p>
Source: <a href="https://brillout.github.io/star-wars">brillout.github.io/star-wars</a>.
Source:{" "}
<a href="https://brillout.github.io/star-wars">
brillout.github.io/star-wars
</a>
.
</p>
</>
);
+3 -1
View File
@@ -9,7 +9,9 @@ export const data = async () => {
// https://vike.dev/useConfig
const config = useConfig();
const response = await fetch("https://brillout.github.io/star-wars/api/films.json");
const response = await fetch(
"https://brillout.github.io/star-wars/api/films.json",
);
const moviesData = (await response.json()) as MovieDetails[];
config({