Redo with React

This commit is contained in:
2020-12-30 21:15:34 -05:00
parent aeafbf31bd
commit 5bfdbabf33
12 changed files with 60 additions and 57 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,41 +0,0 @@
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
/** @license React v0.20.1
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.1
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.1
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.1
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

File diff suppressed because one or more lines are too long

View File

@ -1,2 +0,0 @@
(this.webpackJsonpthanos=this.webpackJsonpthanos||[]).push([[0],{14:function(e,t,n){},15:function(e,t,n){},16:function(e,t,n){"use strict";n.r(t);var c=n(0),r=n(1),i=n.n(r),s=n(3),a=n.n(s),o=(n(14),n(7)),j=n(4),h=n(5),u=n(8),l=n(6);n(15);function d(e){return Object(c.jsxs)("div",{className:"card",children:[Object(c.jsx)("h4",{children:Object(c.jsx)("b",{children:e.Username})}),Object(c.jsxs)("div",{className:"container",children:[Object(c.jsx)("p",{children:e.Closed}),Object(c.jsx)("p",{children:e.UserID})]})]})}var b=function(e){Object(u.a)(n,e);var t=Object(l.a)(n);function n(){var e;Object(j.a)(this,n);for(var c=arguments.length,r=new Array(c),i=0;i<c;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))).state={verifications:[]},e}return Object(h.a)(n,[{key:"componentDidMount",value:function(){var e=this;fetch("https://thanos.nightmare.haus/api/verifications").then((function(e){return e.json()})).then((function(t){return e.setState({verifications:t})}))}},{key:"render",value:function(){return Object(c.jsx)("div",{className:"App",children:Object(c.jsx)("ul",{children:this.state.verifications.map((function(e,t){return Object(c.jsxs)("li",{children:[" ",Object(c.jsx)(d,Object(o.a)({},e))]},t)}))})})}}]),n}(i.a.Component);a.a.render(Object(c.jsx)(i.a.StrictMode,{children:Object(c.jsx)(b,{})}),document.getElementById("react_app"))}},[[16,1,2]]]);
//# sourceMappingURL=main.cf70ea3e.chunk.js.map

View File

@ -1 +0,0 @@
{"version":3,"sources":["App.js","index.js"],"names":["Card","data","className","Username","Closed","UserID","Verification","state","verifications","fetch","then","response","json","setState","this","map","i","React","Component","ReactDOM","render","StrictMode","document","getElementById"],"mappings":"8OAGA,SAASA,EAAKC,GACV,OACE,sBAAKC,UAAU,OAAf,UACA,6BAAI,4BAAID,EAAKE,aACX,sBAAKD,UAAU,YAAf,UACE,4BAAID,EAAKG,SACT,4BAAIH,EAAKI,e,IA8BJC,E,4MAvBXC,MAAQ,CACJC,cAAe,I,kEAEE,IAAD,OAEhBC,MADe,mDAEVC,MAAK,SAACC,GAAD,OAAcA,EAASC,UAC5BF,MAAK,SAACT,GAAD,OAAU,EAAKY,SAAS,CAACL,cAAeP,S,+BAGlD,OACG,qBAAKC,UAAU,MAAf,SACI,6BACKY,KAAKP,MAAMC,cAAcO,KAAI,SAACd,EAAMe,GAAP,OAC1B,mCAAa,cAAChB,EAAD,eAAUC,MAAde,c,GAfLC,IAAMC,WCVjCC,IAASC,OACP,cAAC,IAAMC,WAAP,UACE,cAAC,EAAD,MAEFC,SAASC,eAAe,gB","file":"static/js/main.cf70ea3e.chunk.js","sourcesContent":["import React from 'react';\nimport './App.css';\n\nfunction Card(data) {\n return (\n <div className=\"card\">\n <h4><b>{data.Username}</b></h4>\n <div className=\"container\">\n <p>{data.Closed}</p>\n <p>{data.UserID}</p>\n </div>\n </div>\n )\n }\n\nclass Verification extends React.Component {\n state = {\n verifications: []\n }\n componentDidMount() {\n const apiUrl = 'https://thanos.nightmare.haus/api/verifications';\n fetch(apiUrl)\n .then((response) => response.json())\n .then((data) => this.setState({verifications: data}));\n }\n render() {\n return (\n <div className=\"App\">\n <ul>\n {this.state.verifications.map((data, i) => (\n <li key={i}> <Card {...data} /></li>\n ))}\n </ul>\n </div>\n );\n }\n}\n\n\nexport default Verification;","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App';\n\nReactDOM.render(\n <React.StrictMode>\n <App />\n </React.StrictMode>,\n document.getElementById('react_app')\n);\n"],"sourceRoot":""}