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 (
+
);