added nextjs
This commit is contained in:
21
app/inside/page.tsx
Normal file
21
app/inside/page.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user