{"size": 584, "ext": "js", "max_stars_repo_path": "src/index.js", "max_stars_repo_name": "Iryna1320/pexels-api-cw", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/index.js", "max_issues_repo_name": "Iryna1320/pexels-api-cw", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/index.js", "max_forks_repo_name": "Iryna1320/pexels-api-cw", "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": 32.4444444444, "max_line_length": 83, "alphanum_fraction": 0.6952054795}
import styles from './styles.css';
// import libs from './js/libs.js';
import fetchObject from './js/fetch.js';
import x from './js/refs.js';
// console.log(x.form);
const { form, searchBtn, gallery } = x; //деструктуризировали для получения доступа
// console.log(form, searchBtn, gallery);

form.addEventListener('submit', e => {
  e.preventDefault();
  // console.log(e);
  // console.log(e.target);
  // console.log(e.target.elements);
  // console.log(e.target.elements.query);
  const inputValue = e.target.elements.query.value;
  fetchObject.getFetch(inputValue, gallery);
});
