Skip to content

Commit

Permalink
include icon in flow breadcrumb header too
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak committed Sep 22, 2023
1 parent c90a424 commit e65a06a
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions editor.planx.uk/src/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import Edit from "@mui/icons-material/Edit";
import KeyboardArrowDown from "@mui/icons-material/KeyboardArrowDown";
import MenuOpenIcon from "@mui/icons-material/MenuOpen";
import Visibility from "@mui/icons-material/Visibility";
import AppBar from "@mui/material/AppBar";
import Avatar from "@mui/material/Avatar";
import Box from "@mui/material/Box";
Expand All @@ -10,8 +12,7 @@ import Link from "@mui/material/Link";
import MenuItem from "@mui/material/MenuItem";
import Paper from "@mui/material/Paper";
import Popover from "@mui/material/Popover";
import { Theme } from "@mui/material/styles";
import { styled } from "@mui/material/styles";
import { styled,Theme } from "@mui/material/styles";
import MuiToolbar from "@mui/material/Toolbar";
import Typography from "@mui/material/Typography";
import useMediaQuery from "@mui/material/useMediaQuery";
Expand Down Expand Up @@ -50,6 +51,9 @@ const Root = styled(AppBar)(() => ({
const BreadcrumbsRoot = styled(Box)(() => ({
cursor: "pointer",
fontSize: 20,
display: "flex",
columnGap: 10,
alignItems: "center",
}));

const StyledToolbar = styled(MuiToolbar)(() => ({
Expand Down Expand Up @@ -233,6 +237,15 @@ const Breadcrumbs: React.FC<{
</Link>
</>
)}
{route.data.flow && (
<>
{useStore.getState().canUserEditTeam(route.data.team) ? (
<Edit />
) : (
<Visibility />
)}
</>
)}
</BreadcrumbsRoot>
);
};
Expand Down

0 comments on commit e65a06a

Please sign in to comment.