added nextjs

This commit is contained in:
2024-05-16 10:40:04 +07:00
parent 6129f489dd
commit 6d6bef8f50
13 changed files with 943 additions and 32 deletions

21
app/inside/page.tsx Normal file
View File

@@ -0,0 +1,21 @@
"use client";
import { useState } from "react";
import IdComponent from "./IdComponent";
export default function Page() {
let [idList, setIdList] = useState<string[]>([]);
function submit() {
console.log(idList);
}
return (
<div>
<IdComponent updateIdList={(cids) => setIdList(cids)} />
<p className="flex justify-center gap-4 mt-2 items-center">
Total: {idList.length}{" "}
<button className="bg-green-200 p-2 rounded-md" onClick={submit}>
Submit
</button>
</p>
</div>
);
}