Skip to content

Commit

Permalink
Merge pull request #3603 from ingef/fix-logo-url
Browse files Browse the repository at this point in the history
Try and fix logo url
  • Loading branch information
Kadrian authored Oct 14, 2024
2 parents 7c965e2 + b9a2482 commit 65e72db
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
14 changes: 10 additions & 4 deletions frontend/src/js/header/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import styled from "@emotion/styled";
import { FC } from "react";
import { useTranslation } from "react-i18next";
import { useSelector } from "react-redux";

Expand All @@ -8,6 +7,7 @@ import { HistoryButton } from "../button/HistoryButton";
import DatasetSelector from "../dataset/DatasetSelector";
import { canViewEntityPreview, useHideLogoutButton } from "../user/selectors";

import { useTheme } from "@emotion/react";
import { HelpMenu } from "./HelpMenu";
import LogoutButton from "./LogoutButton";

Expand Down Expand Up @@ -51,7 +51,6 @@ const Spacer = styled("span")`
const Logo = styled("div")`
height: 40px;
width: ${({ theme }) => theme.img.logoWidth};
background-image: url(${({ theme }) => theme.img.logo});
background-repeat: no-repeat;
background-position-y: 50%;
background-size: ${({ theme }) => theme.img.logoBackgroundSize};
Expand All @@ -68,7 +67,7 @@ const Headline = styled("h1")`
color: ${({ theme }) => theme.col.blueGrayDark};
`;

const Header: FC = () => {
const Header = () => {
const { t } = useTranslation();
const canViewHistory = useSelector<StateT, boolean>(canViewEntityPreview);
const hideLogoutButton = useHideLogoutButton();
Expand All @@ -77,10 +76,17 @@ const Header: FC = () => {
StateT["startup"]["config"]
>((state) => state.startup.config);

const theme = useTheme();
const logo = theme.img.logo;

return (
<Root>
<OverflowHidden>
<Logo />
<Logo
style={{
backgroundImage: `url(${logo})`,
}}
/>
<Spacer />
<Headline>{t("headline")}</Headline>
</OverflowHidden>
Expand Down
1 change: 1 addition & 0 deletions frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default defineConfig({
build: {
sourcemap: true,
minify: "terser",
assetsInlineLimit: 0,
},
envPrefix: "REACT_APP_",
plugins: [
Expand Down

0 comments on commit 65e72db

Please sign in to comment.