{"size": 585, "ext": "js", "max_stars_repo_path": "frontend/src/App.js", "max_stars_repo_name": "beregcamlost/walmartchallenge", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "frontend/src/App.js", "max_issues_repo_name": "beregcamlost/walmartchallenge", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "frontend/src/App.js", "max_forks_repo_name": "beregcamlost/walmartchallenge", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.5, "max_line_length": 55, "alphanum_fraction": 0.6290598291}
import { useState, useCallback } from 'react';
import { Skeleton } from './components/layout';
import { ListProduct } from './components/list';
import 'antd/dist/antd.css';
import './App.css';

function App() {
  
  const [search, setSearch] = useState(undefined);
  
  const onSearch = useCallback((evt) => {
    const value = evt && evt.target && evt.target.value
    if (value && value.length >= 3) {
      setSearch(value);
    }
  }, []);

  return (
    <Skeleton onSearch={onSearch}>
      <ListProduct search={search}></ListProduct>
    </Skeleton>
  );
}

export default App;
