format
This commit is contained in:
@@ -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({
|
||||
|
||||
@@ -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>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user