You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
7.5 KiB
1 lines
7.5 KiB
{"version":3,"sources":["App.js","index.js"],"names":["Card","props","state","data","details","expand","onClick","bind","e","fetch","this","UserID","then","res","json","response","setState","catch","error","console","log","UserDetail","verification","Photo","Nick","Username","user","id","joined_at","Closed","className","href","React","Component","CardImg","src","undefined","alt","style","width","avatar","Pending","pending","Object","values","map","i","Verification","verifications","ReactDOM","render","StrictMode","document","getElementById"],"mappings":"+OAIMA,G,wDAOJ,WAAYC,GAAQ,IAAD,8BACjB,cAAMA,IAPRC,MAAQ,CACNC,KAAM,GACNC,QAAS,GACTC,QAAQ,GAKR,EAAKH,MAAMC,KAAOF,EAClB,EAAKC,MAAME,QAAU,GACrB,EAAKF,MAAMG,QAAS,EACpB,EAAKC,QAAU,EAAKA,QAAQC,KAAb,gBALE,E,oDAOXC,GAAI,IAAD,OACTC,MAAM,iDAAD,OAC8CC,KAAKR,MAAMC,KAAKQ,SAEhEC,MAAK,SAAAC,GAAG,OAAIA,EAAIC,UAChBF,MAAK,SAAAG,GACJ,EAAKC,SAAS,CAACb,KAAM,EAAKD,MAAMC,KAAME,QAAS,EAAKH,MAAMG,OAAQD,QAASW,OAE5EE,OAAM,SAAAC,GAAK,OAAIC,QAAQC,IAAIF,Q,+BAG9B,GAAIR,KAAKR,MAAMG,OAAQ,CACrB,GAA0B,MAAtBK,KAAKR,MAAME,QACb,OACE,qBAAKE,QAASI,KAAKJ,QAAnB,SACE,cAACe,EAAD,CAAYlB,KAAMO,KAAKR,MAAME,QAASkB,aAAcZ,KAAKR,MAAMC,KAAKoB,UAKxE,IAAInB,EAAU,GAKd,OAJAA,EAAQoB,KAAOd,KAAKR,MAAMC,KAAKsB,SAAW,aAC1CrB,EAAQsB,KAAO,GACftB,EAAQsB,KAAKC,GAAKjB,KAAKR,MAAMC,KAAKQ,OAClCP,EAAQwB,UAAYlB,KAAKR,MAAMC,KAAK0B,OAElC,qB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Q,IAAD,OAEhBjC,MADe,6CAEVG,MAAK,SAACG,GAAD,OAAcA,EAASD,UAC5BF,MAAK,SAACT,GAAD,OAAU,EAAKa,SAAS,CAAC0B,QAASC,OAAOC,OAAOzC,U,+BAG1D,OACG,sBAAK2B,UAAU,MAAf,UACI,6BACKpB,KAAKR,MAAMwC,QAAQG,KAAI,SAAC1C,EAAM2C,GAAP,OACnB,mCAAa,cAACZ,EAAD,eAAa/B,MAAjB2C,QAGlB,8B,GAlBOd,IAAMC,WAwDbc,E,4MA7BX7C,MAAQ,CACJ8C,cAAe,I,kEAEE,IAAD,OAEhBvC,MADe,mDAEVG,MAAK,SAACG,GAAD,OAAcA,EAASD,UAC5BF,MAAK,SAACT,GAAD,OAAU,EAAKa,SAAS,CAACgC,cAAe7C,S,+BAIlD,OACG,sBAAK2B,UAAU,MAAf,UACE,cAAC,EAAD,IACE,6BACKpB,KAAKR,MAAM8C,cAAcH,KAAI,SAAC1C,EAAM2C,GAAP,OAC1B,mCAAa,cAAC,EAAD,eAAU3C,MAAd2C,e,GAjBLd,IAAMC,WCnHjCgB,IAASC,OACP,eAAC,IAAMC,WAAP,WACE,cAAC,EAAD,IACA,cAAC,EAAD,OAEFC,SAASC,eAAe,gB","file":"static/js/main.a24cc14e.chunk.js","sourcesContent":["\nimport React from \"react\";\nimport './App.css';\n\nclass Card extends React.Component{\n state = {\n data: {},\n details: {},\n expand: false\n }\n\n constructor(props) {\n super(props);\n this.state.data = props;\n this.state.details = {};\n this.state.expand = false;\n this.onClick = this.onClick.bind(this);\n }\n onClick(e) {\n fetch(\n `https://thanos.nightmare.haus/api/user?userID=${this.state.data.UserID}`\n )\n .then(res => res.json())\n .then(response => {\n this.setState({data: this.state.data, expand: !this.state.expand, details: response});\n })\n .catch(error => console.log(error));\n }\n render() {\n if (this.state.expand) {\n if (this.state.details != null) {\n return (\n <div onClick={this.onClick}>\n <UserDetail data={this.state.details} verification={this.state.data.Photo} />\n </div>\n \n )\n } else {\n var details = {};\n details.Nick = this.state.data.Username + \" (Invalid)\";\n details.user = {};\n details.user.id = this.state.data.UserID;\n details.joined_at = this.state.data.Closed;\n return (\n <div onClick={this.onClick}>\n <UserDetail data={details} verification={this.state.data.Photo} />\n </div>\n )\n }\n\n }\n return (\n <div className=\"card\" onClick={this.onClick}>\n <h4><b>{this.state.data.Username}{this.state.details == null ? \" (Invalid)\" : \"\"}</b></h4>\n <div className=\"container\">\n <p>{this.state.data.Closed}</p>\n <p>{this.state.data.UserID}</p>\n <p><a href={this.state.data.Photo}>Verification Photo</a></p>\n </div>\n </div>\n );\n}\n}\n\n function CardImg(data) {\n return (\n <div className=\"card-img\">\n <h4><b>Pend: {data.Username}</b></h4>\n <img src={data.Photo !== undefined ? data.Photo : \"https://thiscatdoesnotexist.com/\"} alt=\"Avatar\" style={{ width: \"100%\" }} />\n <div className=\"container\">\n <p>{data.UserID}</p>\n </div>\n </div>\n )\n }\n\nfunction UserDetail(data, verification) {\n console.log(data);\n verification = data.verification\n data = data.data;\n return (\n <div className=\"card-img\">\n <h4><b>{data.Nick !== null ? data.Nick : data.user.Username}</b></h4> \n <img src={data.user.avatar !== undefined ? `https://cdn.discordapp.com/avatars/${data.user.id}/${data.user.avatar}.png?size=64` : \"\"} alt=\"Avatar\" />\n \n <div className=\"container\">\n \n <img src={verification !== undefined ? verification : \"https://thiscatdoesnotexist.com/\"} alt=\"Avatar\" style={{ width: \"100%\" }} />\n <p>{data.joined_at}</p>\n <p>{data.user.id}</p>\n </div>\n </div>\n );\n}\n\nclass Pending extends React.Component {\n state = {\n pending: []\n }\n componentDidMount() {\n const apiUrl = 'https://thanos.nightmare.haus/api/pending';\n fetch(apiUrl)\n .then((response) => response.json())\n .then((data) => this.setState({pending: Object.values(data)}));\n }\n render() {\n return (\n <div className=\"App\">\n <ul>\n {this.state.pending.map((data, i) => (\n <li key={i}> <CardImg {...data} /></li>\n ))}\n </ul>\n <br></br>\n </div>\n );\n }\n}\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\n render() {\n return (\n <div className=\"App\">\n <Pending />\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\nexport {\n Pending,\n Verification,\n}\n\nexport default Verification;","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport Verification from './App';\nimport Pending from './App';\n\nReactDOM.render(\n <React.StrictMode>\n <Pending />\n <Verification />\n </React.StrictMode>,\n document.getElementById('react_app')\n);\n"],"sourceRoot":""} |