Skip to content

Commit

Permalink
Added appropriate icon for error UI; reformatted error UI text to emp…
Browse files Browse the repository at this point in the history
…hasisze the proper information.
  • Loading branch information
wrigh393 committed Jul 14, 2021
1 parent 1931506 commit 305d694
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/components/AppView/AppView.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import ItemViewAppBar from "../ItemViewAppBar/";
import ItemView from "../ItemView/";
import QueueSelector from "../QueueSelector/";
import { useToken } from "../AuthProvider/";
import ErrorOutlineIcon from '@material-ui/icons/ErrorOutline';

export default function AppView({ setDarkMode }) {
// Create stateful variables.
Expand Down Expand Up @@ -115,6 +116,9 @@ export default function AppView({ setDarkMode }) {
alignItems: "center",
justifyContent: "center",
marginTop: theme.spacing(6)
},
errorIcon: {
fontSize: "10rem"
}
});
const classes = useStyles();
Expand All @@ -129,14 +133,12 @@ export default function AppView({ setDarkMode }) {
value={selectedQueues}
setValue={setSelectedQueues}
/>{error ? <Box classes={{ root: classes.errorContainer }}>
<Typography variant="h1">
{response.status}
</Typography>
<Typography variant="h3">
Something went wrong.
<ErrorOutlineIcon classes={{ root: classes.errorIcon }} />
<Typography align="center" variant="h3">
{`${response.message}`}
</Typography>
<Typography variant="h5">
{response.message}
<Typography align="center" variant="h5">
{`Error Code:${response.status}`}
</Typography>
</Box> : <ItemTable data={items} rowCanBeSelected={sidebarOpen} loading={isLoading} />}
</Box>
Expand Down

0 comments on commit 305d694

Please sign in to comment.