Skip to content

Commit

Permalink
Remove bug stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackIQ committed Apr 21, 2023
1 parent 05b1afc commit 68dd986
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 49 deletions.
40 changes: 5 additions & 35 deletions src/components/navbar/navbar.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ import {
ListItemIcon,
IconButton,
Drawer,
Dialog,
DialogTitle,
DialogContent,
DialogContentText,
Alert,
Snackbar,
} from "@mui/material";
Expand All @@ -39,9 +35,6 @@ import {
import { UNSET_USER } from "@/redux/actions/user";
import { UNSET_TOKEN } from "@/redux/actions/token";

import { Form } from "@/components";
import API from "@/api";

const drawerWidth = 240;
const navItems = [
{
Expand Down Expand Up @@ -82,8 +75,6 @@ const Navbar = () => {
setDrawerOpen(!drawerOpen);
};

const [dialogOpen, setDialogOpen] = useState(false);

const [snackOpen, setSnackOpen] = useState(false);
const [snackTitle, setSnackTitle] = useState("");
const [snackType, setSnackType] = useState("");
Expand All @@ -94,16 +85,6 @@ const Navbar = () => {
setSnackOpen(true);
};

const repostBug = (callback) => {
API.post(`bug`, callback)
.then((result) => {
createSnack(result.data.message, "success");
})
.catch((error) => {
createSnack(error.response.data.message, "error");
});
};

const drawer = (
<Box onClick={handleDrawerToggle} sx={{ textAlign: "center" }}>
<Toolbar />
Expand Down Expand Up @@ -159,7 +140,11 @@ const Navbar = () => {
<Divider />
<List>
<ListItem disablePadding>
<ListItemButton onClick={() => setDialogOpen(true)}>
<ListItemButton
onClick={() =>
window.open("https://github.com/tfasoft/api/issues/new")
}
>
<ListItemText primary="Report bug" />
<ListItemIcon sx={{ color: "primary.main" }}>
<BugReport />
Expand Down Expand Up @@ -223,21 +208,6 @@ const Navbar = () => {
</Drawer>
</Box>

<Dialog open={dialogOpen} onClose={() => setDialogOpen(false)}>
<DialogTitle color="primary.main">Report bug</DialogTitle>
<DialogContent>
<DialogContentText>
So, you found a bug! Report it to us please.
</DialogContentText>
<Form
name="reportBug"
button="Report"
btnStyle={{ fullWidth: false, disabled: false }}
callback={repostBug}
/>
</DialogContent>
</Dialog>

<Snackbar
open={snackOpen}
autoHideDuration={6000}
Expand Down
14 changes: 0 additions & 14 deletions src/config/form/form.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,6 @@ const forms = {
secure: false,
},
},
reportBug: {
title: {
type: "text",
label: "Title",
placeholder: "Enter bug title",
secure: false,
},
content: {
type: "textarea",
label: "Details",
placeholder: "Enter bug details",
secure: false,
},
},
enableAuth: {
tid: {
type: "text",
Expand Down

0 comments on commit 68dd986

Please sign in to comment.