mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
## Description This PR ensures that the default prettier config is used for examples and templates. This config is compatible with `prettier@3` as well (upgrading prettier is bigger change that can be a future PR). ## Changes - Updated `.prettierrc.json` in root with `"trailingComma": "es5"` (will be needed upgrading to prettier@3) - Added `examples/.prettierrc.json` with default config (this will change every example) - Added `packages/create-next-app/templates/.prettierrc.json` with default config (this will change every template) ## Related - Fixes #54402 - Closes #54409
54 lines
1.8 KiB
TypeScript
Executable File
54 lines
1.8 KiB
TypeScript
Executable File
import Head from "next/head";
|
|
import Image from "next/image";
|
|
import styles from "../styles/Home.module.css";
|
|
import dynamic from "next/dynamic";
|
|
import { Avatar, Pagination } from "@nextui-org/react";
|
|
|
|
const CustomCheckbox = dynamic(() => import("../components/Checkbox"));
|
|
const CustomTable = dynamic(() => import("../components/Table"));
|
|
const CustomCollapse = dynamic(() => import("../components/Collapse"));
|
|
|
|
export default function Home() {
|
|
return (
|
|
<div className={styles.container}>
|
|
<Head>
|
|
<title>NextUI Example</title>
|
|
<meta name="description" content="Generated by create next app" />
|
|
<link rel="icon" href="/favicon.ico" />
|
|
</Head>
|
|
<main className={styles.main}>
|
|
<h1>
|
|
<Avatar text="Hi" color="gradient" textColor={"white"} size={"xl"} />
|
|
</h1>
|
|
<h1 className={styles.title}>
|
|
Welcome to use <a href="https://nextui.org/">NextUI!</a>
|
|
</h1>
|
|
{/* checkout */}
|
|
<h2>Checkbox:</h2>
|
|
<CustomCheckbox></CustomCheckbox>
|
|
{/* table */}
|
|
<h2>Table:</h2>
|
|
<CustomTable></CustomTable>
|
|
{/* pagination */}
|
|
<h2>Pagination</h2>
|
|
<Pagination total={20} initialPage={1} />
|
|
{/* collapse */}
|
|
<h2>Collapse</h2>
|
|
<CustomCollapse></CustomCollapse>
|
|
</main>
|
|
<footer className={styles.footer}>
|
|
<a
|
|
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
>
|
|
Powered by{" "}
|
|
<span className={styles.logo}>
|
|
<Image src="/vercel.svg" alt="Vercel Logo" width={72} height={16} />
|
|
</span>
|
|
</a>
|
|
</footer>
|
|
</div>
|
|
);
|
|
}
|