Skip to content

Commit 31c6038

Browse files
committed
Only show Create Feed button if in admin mode.
This is in line with showing the feeds in the table. Eventually we should show a disabled button with a message saying to go into admin mode.
1 parent f01c46a commit 31c6038

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

frontend/src/components/listeners/Feeds.tsx

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ import {
55
Dialog,
66
DialogContent,
77
DialogTitle,
8-
Divider,
9-
FormControl,
10-
FormControlLabel,
118
Grid,
129
IconButton,
1310
Pagination,
@@ -31,7 +28,6 @@ import { Link } from "react-router-dom";
3128
import DeleteIcon from "@mui/icons-material/Delete";
3229
import { ErrorModal } from "../errors/ErrorModal";
3330
import DeleteFeedModal from "./DeleteFeedModal";
34-
import { EditFeedModal } from "./EditFeedModal";
3531
import { CreateFeedModal } from "./CreateFeedModal";
3632

3733
export function Feeds() {
@@ -129,15 +125,17 @@ export function Feeds() {
129125
<Grid container>
130126
<Grid item xs={8} />
131127
<Grid item xs={4}>
132-
<Button
133-
variant="contained"
134-
onClick={() => {
135-
setCreateFeedModalOpen(true);
136-
}}
137-
sx={{ float: "right" }}
138-
>
139-
Create New Feed
140-
</Button>
128+
{adminMode ? (
129+
<Button
130+
variant="contained"
131+
onClick={() => {
132+
setCreateFeedModalOpen(true);
133+
}}
134+
sx={{ float: "right" }}
135+
>
136+
Create New Feed
137+
</Button>
138+
) : null}
141139
</Grid>
142140
</Grid>
143141
<Grid container spacing={2} paddingBottom={"16px"}>

0 commit comments

Comments
 (0)