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
6.9 KiB
1 lines
6.9 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","className","Username","Closed","href","React","Component","CardImg","src","undefined","alt","style","width","Nick","user","avatar","id","joined_at","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,OAAIR,KAAKR,MAAMG,QAAgC,MAAtBK,KAAKR,MAAME,QAEhC,qBAAKE,QAASI,KAAKJ,QAAnB,SACE,cAACe,EAAD,CAAYlB,KAAMO,KAAKR,MAAME,QAASkB,aAAcZ,KAAKR,MAAMC,KAAKoB,UAMxE,sBAAKC,UAAU,OAAOlB,QAASI,KAAKJ,QAApC,UACA,6BAAI,8BAAII,KAAKR,MAAMC,KAAKsB,SAAgC,MAAtBf,KAAKR,MAAME,QAAkB,aAAe,QAC5E,sBAAKoB,UAAU,YAAf,UACE,4BAAId,KAAKR,MAAMC,KAAKuB,SACpB,4BAAIhB,KAAKR,MAAM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7BX7C,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,sBAAKqB,UAAU,MAAf,UACE,cAAC,EAAD,IACE,6BACKd,KAAKR,MAAM8C,cAAcH,KAAI,SAAC1C,EAAM2C,GAAP,OAC1B,mCAAa,cAAC,EAAD,eAAU3C,MAAd2C,e,GAjBLlB,IAAMC,WCrGjCoB,IAASC,OACP,eAAC,IAAMC,WAAP,WACE,cAAC,EAAD,IACA,cAAC,EAAD,OAEFC,SAASC,eAAe,gB","file":"static/js/main.482e8a8c.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 && 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 }\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 data = data.data;\n verification = data.verification;\n console.log(data.verification);\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` : \"https://thiscatdoesnotexist.com/\"} 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":""} |