diff --git a/client/app/components/admin/Admin.jsx b/client/app/components/admin/Admin.jsx
index 31a451d..47d941a 100644
--- a/client/app/components/admin/Admin.jsx
+++ b/client/app/components/admin/Admin.jsx
@@ -67,7 +67,10 @@ class AdminComponent extends React.Component {
style={adminComponentStyle.sidebar} />
)
diff --git a/client/app/components/admin/AdminRequestInfo.jsx b/client/app/components/admin/AdminRequestInfo.jsx
index dd508de..f0de6f1 100644
--- a/client/app/components/admin/AdminRequestInfo.jsx
+++ b/client/app/components/admin/AdminRequestInfo.jsx
@@ -1,4 +1,5 @@
import React, { Component } from 'react';
+import PirateSearch from './PirateSearch.jsx'
class AdminRequestInfo extends Component {
@@ -54,6 +55,10 @@ class AdminRequestInfo extends Component {
user_agent: {this.userAgent(request.user_agent)}
request_date: {request.requested_date}
+
+
+
)
}
diff --git a/client/app/components/admin/PirateSearch.jsx b/client/app/components/admin/PirateSearch.jsx
new file mode 100644
index 0000000..b1d5191
--- /dev/null
+++ b/client/app/components/admin/PirateSearch.jsx
@@ -0,0 +1,57 @@
+import React, { Component } from 'react';
+import { fetchJSON } from '../http.jsx';
+
+class PirateSearch extends Component {
+ constructor() {
+ super();
+ this.state = {
+ response: [],
+ name: '',
+ }
+ }
+
+ sendToDownload(torrent) {
+ console.log(torrent.magnet)
+
+ let data = {magnet: torrent.magnet}
+ fetchJSON('https://apollo.kevinmidboe.com/api/v1/pirate/add', 'POST', data)
+ .then((response) => {
+ console.log(response)
+ })
+ }
+
+ searchTheBay() {
+ const query = this.props.name;
+ const type = this.props.type;
+
+ fetchJSON('https://apollo.kevinmidboe.com/api/v1/pirate/search?query='+query+'&type='+type, 'GET')
+ .then((response) => {
+ console.log(response.torrents)
+ this.setState({
+ response: response.torrents.map((torrent, index) => {
+ return (
+
+ {torrent.name}
+ {torrent.size}
+ {torrent.seed}
+
+
+
+ )
+ })
+ })
+ })
+ }
+
+ render() {
+ return (
+
+ {this.props.name}
+
+ {this.state.response}
+
+ )
+ }
+}
+
+export default PirateSearch
\ No newline at end of file