From 194191b92e496fdb269bbca6bc2d6c0afb67d0e4 Mon Sep 17 00:00:00 2001 From: kongnayeon Date: Wed, 3 Aug 2022 00:29:06 +0900 Subject: [PATCH] =?UTF-8?q?:rocket:=20feat:=20=EA=B2=80=EC=83=89=20?= =?UTF-8?q?=EC=98=B5=EC=85=98,=20=EA=B2=80=EC=83=89=EC=B0=BD,=20=EA=B2=80?= =?UTF-8?q?=EC=83=89=20=EB=B2=84=ED=8A=BC=20#4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/users/UsersApi.js | 3 ++ src/components/Tables/UsersPage/Table.js | 11 +---- src/components/Tables/UsersPage/UserSearch.js | 43 +++++++++++++++++++ src/components/Tables/UsersPage/UsersPage.js | 2 + 4 files changed, 49 insertions(+), 10 deletions(-) create mode 100644 src/components/Tables/UsersPage/UserSearch.js diff --git a/src/apis/users/UsersApi.js b/src/apis/users/UsersApi.js index e69de29..754e8e6 100644 --- a/src/apis/users/UsersApi.js +++ b/src/apis/users/UsersApi.js @@ -0,0 +1,3 @@ +const { default: axios } = require('axios'); + +const { default: InstanceSetting } = require('../common/instance.api'); diff --git a/src/components/Tables/UsersPage/Table.js b/src/components/Tables/UsersPage/Table.js index 5dee817..e9f150a 100644 --- a/src/components/Tables/UsersPage/Table.js +++ b/src/components/Tables/UsersPage/Table.js @@ -22,10 +22,9 @@ function UsersPageTable() { }; useEffect(() => { - setPage(page + 1); dispatch( usersPage({ - requestPage: page + requestPage: 1 }) ); }, [dispatch]); @@ -52,14 +51,6 @@ function UsersPageTable() { }} key="id" rowKey="id" - // onRow={(record, rowIndex) => { - // return { - // onClick: event => { - // console.log(event, record); - // onStopClickHandler(record); - // } // click row - // }; - // }} pageSize={10} dataSource={data ? data.userList : []} > diff --git a/src/components/Tables/UsersPage/UserSearch.js b/src/components/Tables/UsersPage/UserSearch.js new file mode 100644 index 0000000..58976d0 --- /dev/null +++ b/src/components/Tables/UsersPage/UserSearch.js @@ -0,0 +1,43 @@ +import { Button, Input, Select } from 'antd'; +import React, { useState } from 'react'; +const { Option } = Select; + +function UserSearch() { + const [searchOption, setSearchOption] = useState('입금자명'); + + const onOptionChange = e => { + console.log(e); + if (e === '1') { + setSearchOption('입금자명'); + } else { + setSearchOption('전화번호'); + } + }; + + return ( + <> +
+ + + + + +
+
+ + ); +} + +export default UserSearch; diff --git a/src/components/Tables/UsersPage/UsersPage.js b/src/components/Tables/UsersPage/UsersPage.js index 601a6f1..5564cc8 100644 --- a/src/components/Tables/UsersPage/UsersPage.js +++ b/src/components/Tables/UsersPage/UsersPage.js @@ -1,9 +1,11 @@ import React from 'react'; import UsersPageTable from './Table'; +import UserSearch from './UserSearch'; function UsersPage() { return (
+
);