added linting

added linting
This commit is contained in:
2024-05-16 16:59:25 +07:00
parent d125687536
commit 5c4abf24bb
15 changed files with 1759 additions and 71 deletions

View File

@@ -14,7 +14,7 @@ export default function IdComponent({ updateIdList }: Props) {
};
useEffect(() => {
updateIdList([...idSet]);
}, [idSet]);
}, [idSet, updateIdList]);
return (
<div className="flex justify-center">
<div className="flex flex-col gap-2">
@@ -37,7 +37,7 @@ function FixedId({ cid, removeCid }: FixedIdProps) {
<div className="flex gap-2">
<input type="text" className="border-2" disabled value={cid} />
<button
className="bg-red-300 p-2 rounded-md"
className="rounded-md bg-red-300 p-2"
onClick={() => removeCid(cid)}
>
@@ -61,7 +61,7 @@ function SingleIdComponent({ onValidId }: SingleIdProps) {
setCid("");
}
}, [cid]);
}, [cid, onValidId]);
return (
<div className="flex gap-2">
<input

View File

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