diff --git a/src/client/.env b/src/client/.env
index 02a4337..b046e98 100644
--- a/src/client/.env
+++ b/src/client/.env
@@ -1,2 +1,3 @@
-REACT_APP_API_URL=https://asura.feal.no/api
+REACT_APP_API_URL=http://10.24.1.22:3001/api
+REACT_APP_LOGIN_URL=http://localhost:3001/auth/google
BROWSER=none
diff --git a/src/client/public/btn_google_signing_dark.png b/src/client/public/btn_google_signing_dark.png
new file mode 100644
index 0000000..f27bb24
Binary files /dev/null and b/src/client/public/btn_google_signing_dark.png differ
diff --git a/src/client/src/AdminsOverview.js b/src/client/src/AdminsOverview.js
index 5484b19..f04db42 100644
--- a/src/client/src/AdminsOverview.js
+++ b/src/client/src/AdminsOverview.js
@@ -1,10 +1,12 @@
import * as React from "react";
-import { BrowserRouter as Router, Link, Route, Routes } from "react-router-dom";
-import AppBar from "./components/AsuraBar";
+import { BrowserRouter as Router, Link, Route, Routes, useParams } from "react-router-dom";
+import Appbar from "./components/AsuraBar";
import ErrorSnackbar from "./components/ErrorSnackbar";
-import {Button, Textfield, Stack, InputLabel, Paper, Typography} from '@mui/material';
-import DeleteIcon from '@mui/icons/Delete';
+import {Button, Box, TextField, Stack, InputLabel, Paper, TableContainer, Table, TableBody, TableHead, TableCell, TableRow, Typography} from '@mui/material';
+import AddCircleIcon from '@mui/icons-material/AddCircle';
+import DeleteIcon from '@mui/icons-material/Delete';
+import EditIcon from '@mui/icons-material/Edit';
function showError(error) {
alert("Something went wrong. \n" + error);
@@ -14,14 +16,14 @@ function showError(error) {
function AdminCreator(props){
function postCreate(){
let adminEmail = document.getElementById("adminEmailInput").value;
- if (!adminName) {
+ if (!adminEmail) {
showError("Admin email is required");
return;
}
let formData = new FormData();
- formData.append("name", teamName)
+ formData.append("email", adminEmail)
let body = new URLSearchParams(formData)
fetch(process.env.REACT_APP_API_URL + `/admins/create`, {
@@ -58,5 +60,75 @@ function AdminCreator(props){
function AdminList(props){
const deleteAdmin = adminId => {
- fetch(process.env.REACT_APP_API_URL)
+ fetch(process.env.REACT_APP_API_URL + `/admins/${adminId}`, {method: "DELETE"})
+ .then(res => res.json())
+ .then(data => {
+ if(data.status !== "OK"){
+ showError(data.data);
+ return;
+ }
+ props.setAdmins(props.admins.filter(admin => admin.id !== adminId));
+ })
+ .catch(error => showError(error));
+ }
+
+ return(
+
+
+