Fix bug UI and update variable name

This commit is contained in:
2023-10-30 14:57:53 +07:00
parent 96bbe99523
commit af4af45aeb
3 changed files with 13 additions and 13 deletions
+4 -4
View File
@@ -105,8 +105,8 @@ const UserTable = ({
openFormDialog,
setUser,
}: IUserTable) => {
const [keyPhone, setKeyPhone] = useState('');
const { data, isPending, errorMsg } = useFetch('users', keyPhone, reload);
const [phoneSearch, setPhoneSearch] = useState('');
const { data, isPending, errorMsg } = useFetch('users', phoneSearch, reload);
const [users, setUsers] = useState<TUser[]>([]);
useEffect(() => {
@@ -125,7 +125,7 @@ const UserTable = ({
<>
<Direction>
<StyledOperationTable>
<Search setKeyPhone={setKeyPhone} />
<Search setPhoneSearch={setPhoneSearch} />
</StyledOperationTable>
{isPending && <Spinner />}
@@ -156,7 +156,7 @@ const UserTable = ({
</Table>
</Menus>
) : (
<Message>No data to show here!</Message>
!isPending && <Message>No data to show here!</Message>
)}
</Direction>
</>