<filename>node_modules/.cache/babel-loader/dc916e3b999799697612187e6b1b559e.json
{"ast":null,"code":"import _slicedToArray from \"C:\\\\Users\\\\Adrian\\\\Desktop\\\\react project\\\\gallery\\\\node_modules\\\\@babel\\\\runtime/helpers/esm/slicedToArray\";\nvar _jsxFileName = \"C:\\\\Users\\\\Adrian\\\\Desktop\\\\react project\\\\gallery\\\\src\\\\App.js\";\nimport React, { useState } from 'react';\n\nconst App = () => {\n  const client_id = `cdf04b05665f0efd4eb7272c93633384cae55bb23a0833102eee61692ebda4fd`;\n  let url = `https://api.unsplash.com/search/photos/?client_id=${client_id}&query=mountains`;\n\n  const _useState = useState([]),\n        _useState2 = _slicedToArray(_useState, 2),\n        images = _useState2[0],\n        setImages = _useState2[1];\n\n  fetch(url).then(function (data) {\n    return data.json();\n  }).then(function (data) {\n    console.log(data.results);\n    setImages(data.results);\n  });\n  return React.createElement(\"div\", {\n    className: \"App\",\n    __source: {\n      fileName: _jsxFileName,\n      lineNumber: 22\n    },\n    __self: this\n  }, \"Learn React\");\n};\n\nexport default App;","map":{"version":3,"sources":["C:/Users/Adrian/Desktop/react project/gallery/src/App.js"],"names":["React","useState","App","client_id","url","images","setImages","fetch","then","data","json","console","log","results"],"mappings":";;AAAA,OAAOA,KAAP,IAAiBC,QAAjB,QAAgC,OAAhC;;AAEA,MAAMC,GAAG,GAAG,MAAM;AAEhB,QAAMC,SAAS,GAAE,kEAAjB;AAEA,MAAIC,GAAG,GAAI,qDAAoDD,SAAU,kBAAzE;;AAJgB,oBAMYF,QAAQ,CAAC,EAAD,CANpB;AAAA;AAAA,QAMTI,MANS;AAAA,QAMDC,SANC;;AAQhBC,EAAAA,KAAK,CAACH,GAAD,CAAL,CACGI,IADH,CACQ,UAAUC,IAAV,EAAe;AACnB,WAAOA,IAAI,CAACC,IAAL,EAAP;AAED,GAJH,EAKGF,IALH,CAKQ,UAASC,IAAT,EAAc;AAClBE,IAAAA,OAAO,CAACC,GAAR,CAAYH,IAAI,CAACI,OAAjB;AACAP,IAAAA,SAAS,CAACG,IAAI,CAACI,OAAN,CAAT;AACD,GARH;AAUA,SACE;AAAK,IAAA,SAAS,EAAC,KAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBADF;AAKD,CAvBD;;AAyBA,eAAeX,GAAf","sourcesContent":["import React , { useState }from 'react';\n\nconst App = () => {\n  \n  const client_id=`cdf04b05665f0efd4eb7272c93633384cae55bb23a0833102eee61692ebda4fd`;\n\n  let url = `https://api.unsplash.com/search/photos/?client_id=${client_id}&query=mountains`;\n\n  const [images, setImages] = useState([]);\n\n  fetch(url)\n    .then(function (data){\n      return data.json()\n    \n    })\n    .then(function(data){\n      console.log(data.results);\n      setImages(data.results);\n    })\n\n  return (\n    <div className=\"App\">   \n          Learn React      \n    </div>\n  );\n}\n\nexport default App;\n"]},"metadata":{},"sourceType":"module"}