Skip to content

Commit 890b4bb

Browse files
authored
fix: AB#334 Something is wrong with header integration (#17)
* fix: AB#334 Something is wrong with header integration * fix: AB#334 Something is wrong with header integration Removed comment * fix: AB#334 Something is wrong with header integration Removed secondary color and switched to inherit
1 parent f5d4af3 commit 890b4bb

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/appHeader/AppHeader.jsx

+10-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,14 @@ import {Logout} from "@mui/icons-material";
88
import StarwitLogo from "../assets/img/logo-white.png";
99

1010
function AppHeader(props) {
11-
const {menuItems, title, logo, styles} = props;
11+
const {menuItems, title, logo} = props;
12+
const defaultStyles = HeaderStyles();
13+
14+
let styles = props.styles;
15+
if (!styles){
16+
styles = defaultStyles;
17+
}
18+
1219
const history = useHistory();
1320
const {t} = useTranslation();
1421

@@ -22,10 +29,10 @@ function AppHeader(props) {
2229
</Typography>
2330
<div className={styles.spacer}/>
2431
{menuItems.map(item => (
25-
<Button key={item.title} color="secondary" disableRipple className={styles.linkButton}
32+
<Button key={item.title} color="inherit" disableRipple className={styles.linkButton}
2633
onClick={() => history.push(item.link)}>{t(item.title)}</Button>
2734
))}
28-
<IconButton color="secondary" disableRipple className={styles.linkButton}
35+
<IconButton color="inherit" disableRipple className={styles.linkButton}
2936
onClick={() => history.push("/logout")}><Logout/></IconButton>
3037
</Toolbar>
3138
</AppBar>
@@ -35,7 +42,6 @@ function AppHeader(props) {
3542
}
3643

3744
AppHeader.defaultProps = {
38-
//styles: HeaderStyles(),
3945
title: "A LireJarp App",
4046
logo: StarwitLogo,
4147
menuItems: []

0 commit comments

Comments
 (0)