You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
579 B
TypeScript
26 lines
579 B
TypeScript
import { useData } from "vike-react/useData";
|
|
import type { Data } from "./+data.js";
|
|
|
|
export default function Page() {
|
|
const movies = useData<Data>();
|
|
return (
|
|
<>
|
|
<h1>Star Wars Movies</h1>
|
|
<ol>
|
|
{movies.map(({ id, title, release_date }) => (
|
|
<li key={id}>
|
|
<a href={`/star-wars/${id}`}>{title}</a> ({release_date})
|
|
</li>
|
|
))}
|
|
</ol>
|
|
<p>
|
|
Source:{" "}
|
|
<a href="https://brillout.github.io/star-wars">
|
|
brillout.github.io/star-wars
|
|
</a>
|
|
.
|
|
</p>
|
|
</>
|
|
);
|
|
}
|