Commit d1814441 authored by Mai Thanh Cong's avatar Mai Thanh Cong

change text in search profile

parent 08f2f3d6
......@@ -33,18 +33,17 @@ import {
} from "reactstrap";
import { useHistory } from 'react-router-dom';
import dummyData from "../../data/index.json";
import { Routes } from "../../reoutes";
const Inputs = () => {
const [searchProfile, setSearchProfile] = useState();
const history = useHistory();
const handleChangeSearch = (event) => {
console.log("change change");
setSearchProfile(event.target.value);
}
const onHandleSearch = () => {
const onHandleSearch = (event) => {
event.preventDefault();
const nameCode = dummyData.data.map(item => item.code);
console.log("nameCode", nameCode);
const checkSearch = nameCode.indexOf(searchProfile);
......@@ -64,13 +63,13 @@ const Inputs = () => {
<section className="section pb-0 section-components">
<Container className="mb-5">
{/* Inputs */}
<h3 className="h4 text-success font-weight-bold mb-4 text-center">Search profile</h3>
<h3 className="h4 text-success font-weight-bold mb-4 text-center">Tra cu thông tin</h3>
{/* <div className="mb-3">
<small className="text-uppercase font-weight-bold">
Form controls
</small>
</div> */}
<Form className="justify-content-center">
<Form className="justify-content-center" onSubmit={onHandleSearch}>
<FormGroup
// className={classnames({
// focused: this.state.searchFocused
......@@ -83,7 +82,7 @@ const Inputs = () => {
</InputGroupText>
</InputGroupAddon>
<Input
placeholder="Search"
placeholder="Tìm kiếm"
type="text"
// onFocus={e => this.setState({ searchFocused: true })}
// onBlur={e => this.setState({ searchFocused: false })}
......@@ -93,8 +92,8 @@ const Inputs = () => {
</InputGroup>
</FormGroup>
<div className="text-center">
<Button className="btn-1" color="primary" type="button" onClick={onHandleSearch} >
Search
<Button className="btn-1" color="primary" type="submit">
Tìm kiếm
</Button>
</div>
</Form>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment