Add back custom logo/name to sidebar header

This commit is contained in:
Weves 2024-05-29 21:37:49 -07:00 committed by Chris Weaver
parent 69740ba3d5
commit 45402d0755
2 changed files with 18 additions and 7 deletions

View File

@ -16,6 +16,8 @@ import { SettingsContext } from "@/components/settings/SettingsProvider";
import React from "react";
import { FaBrain } from "react-icons/fa";
import { Logo } from "@/components/Logo";
import { HeaderTitle } from "@/components/header/Header";
export const ChatSidebar = ({
existingChats,
@ -44,6 +46,7 @@ export const ChatSidebar = ({
return null;
}
const settings = combinedSettings.settings;
const enterpriseSettings = combinedSettings.enterpriseSettings;
return (
<>
@ -69,12 +72,20 @@ export const ChatSidebar = ({
}
>
<div className="flex w-full">
<div className="h-[32px] w-[30px]">
<Image src="/logo.png" alt="Logo" width="1419" height="1520" />
</div>
<h1 className="flex text-2xl text-strong font-bold my-auto">
Danswer
</h1>
<Logo height={32} width={30} className="mr-1 my-auto" />
{enterpriseSettings && enterpriseSettings.application_name ? (
<div>
<HeaderTitle>
{enterpriseSettings.application_name}
</HeaderTitle>
<p className="text-xs text-subtle -mt-1.5">
Powered by Danswer
</p>
</div>
) : (
<HeaderTitle>Danswer</HeaderTitle>
)}
</div>
</Link>
</div>

View File

@ -12,7 +12,7 @@ import { SettingsContext } from "../settings/SettingsProvider";
import { UserDropdown } from "../UserDropdown";
import { Logo } from "../Logo";
function HeaderTitle({ children }: { children: JSX.Element | string }) {
export function HeaderTitle({ children }: { children: JSX.Element | string }) {
return <h1 className="flex text-2xl text-strong font-bold">{children}</h1>;
}