Skip to content

Commit

Permalink
Fix dark mode logo
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrelefevre committed Dec 19, 2023
1 parent baf5b81 commit 6d6194d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions public/static/logo_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
6 changes: 5 additions & 1 deletion src/components/Logo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import PropTypes from "prop-types";
import { Link as RouterLink } from "react-router-dom";
import { Box } from "@mui/material";
import { useKeycloak } from "@react-keycloak/web";
import { useContext } from "react";
import { ThemeModeContext } from "src/contexts/ThemeModeContext";

Logo.propTypes = {
disabledLink: PropTypes.bool,
Expand All @@ -10,10 +12,12 @@ Logo.propTypes = {

export default function Logo({ disabledLink = false, sx }) {
const { initialized, keycloak } = useKeycloak();
const { mode } = useContext(ThemeModeContext);

const logo = (
<Box sx={{ width: 140, height: "auto", ...sx }}>
<img
src={process.env.PUBLIC_URL + "/static/logo.svg"}
src={process.env.PUBLIC_URL + "/static/logo_" + mode + ".svg"}
className="App-logo"
alt="logo"
/>
Expand Down

0 comments on commit 6d6194d

Please sign in to comment.