1 line
5.4 KiB
JSON
1 line
5.4 KiB
JSON
{"ast":null,"code":"var _jsxFileName = \"/Users/shoofle/Projects/the-forest/src/PageView.jsx\";\nimport logo from './logo.svg';\nimport './App.css';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nfunction requestOneOf(id_we_want) {\n fetch(url, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n statements: [{\n q: 'select * from pages where id=@val',\n params: {\n 'val': id_we_want\n }\n }]\n })\n }).then(res => res.json()).then(data => setCurrentPage(data[0].results.rows[0])).catch(err => console.log(err));\n}\nfunction PageView() {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"App\",\n children: /*#__PURE__*/_jsxDEV(\"header\", {\n className: \"App-header\",\n children: [/*#__PURE__*/_jsxDEV(\"img\", {\n src: logo,\n className: \"App-logo\",\n alt: \"logo\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"p\", {\n children: [\"Edit \", /*#__PURE__*/_jsxDEV(\"code\", {\n children: \"src/App.js\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 26,\n columnNumber: 16\n }, this), \" and save to reload.\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 25,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n className: \"App-link\",\n href: \"/\",\n children: \"Go to here!\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 28,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n children: /*#__PURE__*/_jsxDEV(\"h3\", {\n children: \"Welcome to the forest!\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 23,\n columnNumber: 7\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 22,\n columnNumber: 5\n }, this);\n}\n_c = PageView;\nexport default PageView;\nvar _c;\n$RefreshReg$(_c, \"PageView\");","map":{"version":3,"names":["logo","jsxDEV","_jsxDEV","requestOneOf","id_we_want","fetch","url","method","headers","body","JSON","stringify","statements","q","params","then","res","json","data","setCurrentPage","results","rows","catch","err","console","log","PageView","className","children","src","alt","fileName","_jsxFileName","lineNumber","columnNumber","href","_c","$RefreshReg$"],"sources":["/Users/shoofle/Projects/the-forest/src/PageView.jsx"],"sourcesContent":["import logo from './logo.svg';\nimport './App.css';\n\nfunction requestOneOf(id_we_want) {\n fetch(url, {\n method: 'POST',\n headers: {'Content-Type': 'application/json'},\n body: JSON.stringify({\n statements: [{\n q: 'select * from pages where id=@val',\n params: {'val': id_we_want}\n }]\n })\n })\n .then((res) => res.json())\n .then((data) => setCurrentPage(data[0].results.rows[0]))\n .catch((err) => console.log(err));\n}\n\nfunction PageView() {\n return (\n <div className=\"App\">\n <header className=\"App-header\">\n <img src={logo} className=\"App-logo\" alt=\"logo\" />\n <p>\n Edit <code>src/App.js</code> and save to reload.\n </p>\n <a\n className=\"App-link\"\n href=\"/\">\n Go to here!\n </a>\n <div>\n <h3>Welcome to the forest!</h3>\n </div>\n </header>\n </div>\n );\n}\n\nexport default PageView;"],"mappings":";AAAA,OAAOA,IAAI,MAAM,YAAY;AAC7B,OAAO,WAAW;AAAC,SAAAC,MAAA,IAAAC,OAAA;AAEnB,SAASC,YAAYA,CAACC,UAAU,EAAE;EAChCC,KAAK,CAACC,GAAG,EAAE;IACTC,MAAM,EAAE,MAAM;IACdC,OAAO,EAAE;MAAC,cAAc,EAAE;IAAkB,CAAC;IAC7CC,IAAI,EAAEC,IAAI,CAACC,SAAS,CAAC;MACnBC,UAAU,EAAE,CAAC;QACXC,CAAC,EAAE,mCAAmC;QACtCC,MAAM,EAAE;UAAC,KAAK,EAAEV;QAAU;MAC5B,CA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