Skip to content

Commit

Permalink
added NotFound component to table ✔
Browse files Browse the repository at this point in the history
  • Loading branch information
sank2000 committed May 28, 2021
1 parent 9c52fb9 commit 3a99cf7
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/pages/Admin/Admin/Admin.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import axios from 'axios';
import AddIcon from '@material-ui/icons/Add';
import DeleteForeverOutlinedIcon from '@material-ui/icons/DeleteForeverOutlined';

import { StyledTableCell, StyledTableRow, Dialog, PageLoader } from 'components';
import { StyledTableCell, StyledTableRow, Dialog, PageLoader, NotFound } from 'components';
import { useAlStyles } from 'constants/classes';
import Add from './Add';

Expand Down Expand Up @@ -103,6 +103,7 @@ export default function Admin() {
})}
</TableBody>
</Table>
{data.length === 0 && <NotFound description='No admin found !' />}
</TableContainer>
)}
{loading && <PageLoader />}
Expand Down
5 changes: 3 additions & 2 deletions src/pages/Admin/Section/Section.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ import VisibilityOutlinedIcon from '@material-ui/icons/VisibilityOutlined';
import EditOutlinedIcon from '@material-ui/icons/EditOutlined';
import axios from 'axios';

import { StyledTableCell, StyledTableRow, PageLoader } from 'components';
import { StyledTableCell, StyledTableRow, PageLoader, NotFound } from 'components';
import { useAlStyles } from 'constants/classes';
import Add from './Add';
import Edit from './Edit';
import View from './View';

export default function Staff() {
export default function Section() {
const classes = useAlStyles();
const [openAdd, setOpenAdd] = useState(false);
const [openUpdate, setOpenUpdate] = useState(false);
Expand Down Expand Up @@ -95,6 +95,7 @@ export default function Staff() {
})}
</TableBody>
</Table>
{data.length === 0 && <NotFound description='No section found !' />}
</TableContainer>
)}
{loading && <PageLoader />}
Expand Down
3 changes: 2 additions & 1 deletion src/pages/Admin/Staff/Staff.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import EditOutlinedIcon from '@material-ui/icons/EditOutlined';
import DeleteForeverOutlinedIcon from '@material-ui/icons/DeleteForeverOutlined';
import axios from 'axios';

import { StyledTableCell, StyledTableRow, Dialog, PageLoader } from 'components';
import { StyledTableCell, StyledTableRow, Dialog, PageLoader, NotFound } from 'components';
import { useAlStyles } from 'constants/classes';
import Add from './Add';
import Edit from './Edit';
Expand Down Expand Up @@ -122,6 +122,7 @@ export default function Staff() {
})}
</TableBody>
</Table>
{data.length === 0 && <NotFound description='No Staff Found!' />}
</TableContainer>
)}
{loading && <PageLoader />}
Expand Down
3 changes: 2 additions & 1 deletion src/pages/Admin/Student/Student.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import EditOutlinedIcon from '@material-ui/icons/EditOutlined';
import DeleteForeverOutlinedIcon from '@material-ui/icons/DeleteForeverOutlined';
import axios from 'axios';

import { StyledTableCell, StyledTableRow, Dialog, PageLoader } from 'components';
import { StyledTableCell, StyledTableRow, Dialog, PageLoader, NotFound } from 'components';
import { useAlStyles } from 'constants/classes';
import Add from './Add';
import Edit from './Edit';
Expand Down Expand Up @@ -123,6 +123,7 @@ export default function Student() {
})}
</TableBody>
</Table>
{data.length === 0 && <NotFound description='No Students found !' />}
</TableContainer>
)}
{loading && <PageLoader />}
Expand Down
9 changes: 8 additions & 1 deletion src/pages/Staff/Student.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ import {
} from '@material-ui/core';
import { format } from 'date-fns';

import { StyledTableCell, StyledTableRow, PageLoader, RowWithTypography } from 'components';
import {
StyledTableCell,
StyledTableRow,
PageLoader,
RowWithTypography,
NotFound
} from 'components';
import { useAlStyles } from 'constants/classes';

export default function Student() {
Expand Down Expand Up @@ -86,6 +92,7 @@ export default function Student() {
})}
</TableBody>
</Table>
{data.length === 0 && <NotFound description='No students found !' />}
</TableContainer>
)}
</section>
Expand Down

0 comments on commit 3a99cf7

Please sign in to comment.