diff --git a/src/adminPage/features/users/Users.jsx b/src/adminPage/features/users/Users.jsx index c4c9d866..9ad1ad0f 100644 --- a/src/adminPage/features/users/Users.jsx +++ b/src/adminPage/features/users/Users.jsx @@ -3,7 +3,7 @@ import { fetchServer } from "@common/dataFetch/fetchServer.js"; import Pagination from "@admin/components/Pagination"; import { useState } from "react"; -export default function Comments({ searchString }) { +export default function Comments({ searchString, category }) { searchString; const [page, setPage] = useState(1); const data = useQuery( @@ -11,6 +11,7 @@ export default function Comments({ searchString }) { () => fetchServer(`/api/v1/admin/event-users?page=${page - 1}&search=${searchString}&size=15`) .then((res) => { + console.log(category); return res; }) .catch((e) => { diff --git a/src/adminPage/features/users/index.jsx b/src/adminPage/features/users/index.jsx index c45c3162..bb4afb49 100644 --- a/src/adminPage/features/users/index.jsx +++ b/src/adminPage/features/users/index.jsx @@ -6,6 +6,7 @@ import { useState } from "react"; export default function AdminCommentID() { const [formString, setFormString] = useState(""); const [searchString, setSearchString] = useState(""); + const [category, setCategory] = useState("name"); function searchComment(e) { e.preventDefault(); @@ -14,9 +15,11 @@ export default function AdminCommentID() { return (
-
- 성명 검색 문자열: - {searchString} +
+ 검색 문자열: + {searchString}
@@ -28,12 +31,24 @@ export default function AdminCommentID() { className="bg-neutral-50 focus:bg-white w-full px-4 py-2 rounded-lg text-body-s" /> - 검색 +
+ + + 검색 +
@@ -43,7 +58,7 @@ export default function AdminCommentID() {
}> - +
); diff --git a/src/adminPage/features/users/mock.js b/src/adminPage/features/users/mock.js index e7676a30..7005b05d 100644 --- a/src/adminPage/features/users/mock.js +++ b/src/adminPage/features/users/mock.js @@ -8,6 +8,7 @@ function getRandomUsers() { users = [ ...users, { + id: i, userName: getRandomString(3), phoneNumber: "010-0000-0000", frameId: "event-test",