temporary server action for group and inside

This commit is contained in:
2024-05-17 15:33:15 +07:00
parent c1a019a461
commit 3c37fbf59b
6 changed files with 60 additions and 22 deletions

View File

@@ -1,10 +1,14 @@
"use client";
import { useState } from "react";
import { saveUser } from "./action";
import IdComponent from "./IdComponent";
export default function Page() {
const [idList, setIdList] = useState<string[]>([]);
function submit() {} //TODO! submit inside user
async function submit() {
await saveUser(idList);
alert("อัพเดทสำเร็จ");
}
return (
<div>
<IdComponent updateIdList={(cids) => setIdList(cids)} />