From 00440c97efeaae09db04f07675471c170798ff25 Mon Sep 17 00:00:00 2001 From: Gregory Rudolph Date: Thu, 31 Dec 2020 10:52:37 -0500 Subject: [PATCH] Updates with React and modal attempt --- static/js/main.a19de358.chunk.js | 2 ++ static/js/main.a19de358.chunk.js.map | 1 + 2 files changed, 3 insertions(+) create mode 100644 static/js/main.a19de358.chunk.js create mode 100644 static/js/main.a19de358.chunk.js.map diff --git a/static/js/main.a19de358.chunk.js b/static/js/main.a19de358.chunk.js new file mode 100644 index 0000000..6c85413 --- /dev/null +++ b/static/js/main.a19de358.chunk.js @@ -0,0 +1,2 @@ +(this.webpackJsonpthanos=this.webpackJsonpthanos||[]).push([[0],{15:function(t,e,c){},16:function(t,e,c){},17:function(t,e,c){"use strict";c.r(e);var n=c(0),a=c(1),s=c.n(a),i=c(8),r=c.n(i),o=(c(15),c(7)),h=c(9),j=c(2),d=c(3),l=c(5),u=c(4),b=(c(16),function(t){Object(l.a)(c,t);var e=Object(u.a)(c);function c(t){var n;return Object(j.a)(this,c),(n=e.call(this,t)).state={data:[]},n.setState({data:t}),n}return Object(d.a)(c,[{key:"render",value:function(){return Object(n.jsxs)("div",{className:"card",onClick:p(this.state.data.UserID,this.state.data.Photo),children:[Object(n.jsx)("h4",{children:Object(n.jsx)("b",{children:this.state.data.Username})}),Object(n.jsxs)("div",{className:"container",children:[Object(n.jsx)("p",{children:this.state.data.Closed}),Object(n.jsx)("p",{children:this.state.data.UserID}),Object(n.jsx)("p",{children:Object(n.jsx)("a",{href:this.state.data.Photo,children:"Verification Photo"})})]})]})}}]),c}(s.a.Component));function O(t){return Object(n.jsxs)("div",{className:"card-img",children:[Object(n.jsx)("h4",{children:Object(n.jsx)("b",{children:t.Username})}),Object(n.jsx)("img",{src:void 0!==t.Photo?t.Photo:"https://thiscatdoesnotexist.com/",alt:"Avatar",style:{width:"100%"}}),Object(n.jsx)("div",{className:"container",children:Object(n.jsx)("p",{children:t.UserID})})]})}function p(t,e){var c=Object(a.useState)([]),s=Object(h.a)(c,2),i=s[0],r=s[1];return Object(a.useEffect)((function(){fetch("https://thanos.nightmare.haus/api/user?userID=".concat(t)).then((function(t){return t.json()})).then((function(t){r(t)})).catch((function(t){return console.log(t)}))})),Object(n.jsxs)("div",{className:"card",children:[Object(n.jsx)("h4",{children:Object(n.jsx)("b",{children:i.Nick})}),Object(n.jsx)("img",{src:void 0!==e?e:"https://thiscatdoesnotexist.com/",alt:"Avatar",style:{width:"100%"}}),Object(n.jsxs)("div",{className:"container",children:[Object(n.jsx)("img",{src:void 0!==i.user.avatar?"https://cdn.discordapp.com/avatars/".concat(t,"/").concat(i.user.avatar,".png"):"https://thiscatdoesnotexist.com/",alt:"Avatar",style:{width:"100%"}}),Object(n.jsx)("p",{children:i.joined_at}),Object(n.jsx)("p",{children:i.user.id})]})]})}s.a.Component;var v=function(t){Object(l.a)(c,t);var e=Object(u.a)(c);function c(){var t;Object(j.a)(this,c);for(var n=arguments.length,a=new Array(n),s=0;s\n

{this.state.data.Username}

\n
\n

{this.state.data.Closed}

\n

{this.state.data.UserID}

\n

Verification Photo

\n
\n \n );\n}\n}\n\n function CardImg(data) {\n return (\n
\n

{data.Username}

\n \"Avatar\"\n
\n

{data.UserID}

\n
\n
\n )\n }\n\nfunction UserDetail(userID, verification) {\n const [data, setData] = useState([]);\n useEffect(() => {\n fetch(\n `https://thanos.nightmare.haus/api/user?userID=${userID}`\n )\n .then(res => res.json())\n .then(response => {\n setData(response);\n })\n .catch(error => console.log(error));\n });\n\n return (\n
\n

{data.Nick}

\n \"Avatar\"\n
\n \"Avatar\"\n \n

{data.joined_at}

\n

{data.user.id}

\n
\n
\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: data}));\n }\n render() {\n return (\n
\n
    \n {this.state.pending.map((data) => (\n
  • \n ))}\n
\n
\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
\n
    \n {this.state.verifications.map((data, i) => (\n
  • \n ))}\n
\n
\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 \n \n \n ,\n document.getElementById('react_app')\n);\n"],"sourceRoot":""} \ No newline at end of file