Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Commit

Permalink
remove chart from the site
Browse files Browse the repository at this point in the history
  • Loading branch information
mildrette committed Apr 2, 2024
1 parent 3a2b452 commit da45e09
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 64 deletions.
2 changes: 0 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { ThemeProvider, createTheme } from "@mui/material/styles";
import CssBaseline from "@mui/material/CssBaseline";
import Dashboard from "./Pages/Dashboard";
import ResponsiveDrawer from "./Components/Nav";
import Chart from "./Pages/Charts";
import Loader from "./Components/Loader";
import DialogTable from "./Pages/TableDialog";
import Footer from "./Components/Footer";
Expand Down Expand Up @@ -44,7 +43,6 @@ function App() {
<Routes>
{" "}
<Route path="/" element={<Dashboard />} />
<Route path="/charts" element={<Chart />} />
<Route path="/data" element={<DialogTable />} />
</Routes>
<Footer />
Expand Down
16 changes: 0 additions & 16 deletions src/Components/Nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ import Drawer from "@mui/material/Drawer";
import List from "@mui/material/List";
import ListItem from "@mui/material/ListItem";
import ListItemButton from "@mui/material/ListItemButton";
import ListItemIcon from "@mui/material/ListItemIcon";
import ListItemText from "@mui/material/ListItemText";
import Typography from "@mui/material/Typography";
import { FaChartSimple, FaHouse } from "react-icons/fa6";
import { AppBar, Button, IconButton, Divider, Paper, Toolbar } from "@mui/material";
import { Link } from "react-router-dom";
import { ChevronRight } from "@mui/icons-material";
Expand Down Expand Up @@ -38,20 +36,9 @@ function ResponsiveDrawer({ darkMode, toggleDarkMode }) {
<List sx={{ flexGrow: 1 }}>
<ListItem>
<ListItemButton component="a" to="/">
<ListItemIcon>
<FaHouse />
</ListItemIcon>
<ListItemText> Dashboard </ListItemText>
</ListItemButton>
</ListItem>
<ListItem>
<ListItemButton component="a" to="/charts">
<ListItemIcon>
<FaChartSimple />
</ListItemIcon>
<ListItemText> Charts </ListItemText>
</ListItemButton>
</ListItem>
</List>
<Box
component="footer"
Expand Down Expand Up @@ -107,9 +94,6 @@ function ResponsiveDrawer({ darkMode, toggleDarkMode }) {
<Link to="/">
<Typography sx={{ borderRadius: "50px", m: 1 }}>Dashboard</Typography>
</Link>
<Link to="/charts">
<Typography sx={{ borderRadius: "50px", m: 1 }}>Charts</Typography>
</Link>
</Box>
<Box>
<IconButton
Expand Down
4 changes: 2 additions & 2 deletions src/Components/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function App() {
"https://660549352ca9478ea17ff019.mockapi.io/gateway/api/table-data"
);
const jsonData = await response.json();
// Map the fetched data to fit the columns
// Mapping the fetched data
const mappedData = jsonData.map((item) => ({
id: item.id,
msisdn: item.msisdn,
Expand All @@ -38,7 +38,7 @@ function App() {
routed: item.routed,
success: item.success,
failure: item.failure,
error: item.error // Add error column mapping
error: item.error
}));

setData(mappedData);
Expand Down
44 changes: 0 additions & 44 deletions src/Pages/Charts.js

This file was deleted.

0 comments on commit da45e09

Please sign in to comment.