got new theme system to work without re-rendering

This commit is contained in:
Carter 2025-04-14 16:25:33 -06:00
parent a452cf9444
commit 3454d16f36
12 changed files with 100 additions and 361 deletions

View file

@ -15,7 +15,7 @@ const useStyles = makeStyles((theme: Theme) => ({
appBar: {
zIndex: theme.zIndex.drawer + 1,
backgroundImage: "none", // This prevents de-saturation of header in dark mode
// backgroundColor: "#272727"
backgroundColor: "#272727"
},
toolbar: {
marginLeft: theme.spacing(0.5),
@ -77,16 +77,8 @@ const useStyles = makeStyles((theme: Theme) => ({
},
}));
interface Props {
toggleTheme: () => void;
// teams: Team[];
// setTeams: React.Dispatch<React.SetStateAction<Team[]>>;
}
export default function Header() {
export default function Header(props: Props) {
// const { sideIsOpen, openSide, toggleTheme } = props;
const { toggleTheme } = props;
const themeType = useThemeType();
const classes = useStyles()
const isMobile = useMobile();
@ -125,7 +117,7 @@ export default function Header(props: Props) {
)}
</Box>
<Box className={classes.appBarRight}>
<UserMenu toggleTheme={toggleTheme} />
<UserMenu />
<HeaderButtons hasTeams={hasTeams} team={team} user={user} />
</Box>
</Toolbar>