mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
95acd8b481
This PR updates the with-ionic-typescript example for using the App Router. Here are the changes that have been made: - I renamed the `pages` folder and moved it to the `app` folder. - Added the `layout.tsx` file as part of the App Router. - Updated the `package.json` file. CC: @samcx --------- Co-authored-by: Sam Ko <sam@vercel.com>
32 lines
920 B
TypeScript
32 lines
920 B
TypeScript
import IonicLayout from "@/_components/IonicLayout";
|
|
import CardComponent from "@/_components/Card";
|
|
|
|
export default function Home() {
|
|
const destinations = new Array(8).fill({
|
|
imageSrc: "/img/cat.jpg",
|
|
title: "Madison, WI",
|
|
subtitle: "Destination",
|
|
content:
|
|
"Keep close to Nature's heart... and break clear away, once in awhile, and climb a mountain or spend a week in the woods. Wash your spirit clean.",
|
|
});
|
|
|
|
return (
|
|
<IonicLayout>
|
|
<ion-grid>
|
|
<ion-row>
|
|
{destinations.map((destination, i) => (
|
|
<ion-col key={i} size="3">
|
|
<CardComponent
|
|
imageSrc={destination.imageSrc}
|
|
title={destination.title}
|
|
subtitle={destination.subtitle}
|
|
content={destination.content}
|
|
/>
|
|
</ion-col>
|
|
))}
|
|
</ion-row>
|
|
</ion-grid>
|
|
</IonicLayout>
|
|
);
|
|
}
|