mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-05-30 01:30:21 +02:00
logotype from toggle -> redirect (#2222)
This commit is contained in:
parent
c152123ef4
commit
2e0222d1c1
@ -1,7 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { HistorySidebar } from "@/app/chat/sessionSidebar/HistorySidebar";
|
||||
|
||||
import { ChatSession } from "@/app/chat/interfaces";
|
||||
import { Folder } from "@/app/chat/folders/interfaces";
|
||||
import { User } from "@/lib/types";
|
||||
|
@ -2028,7 +2028,7 @@ export function ChatPage({
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<FixedLogo toggleSidebar={toggleSidebar} />
|
||||
<FixedLogo />
|
||||
</div>
|
||||
</div>
|
||||
<DocumentSidebar
|
||||
|
@ -1,19 +1,11 @@
|
||||
"use client";
|
||||
|
||||
import { FiEdit, FiFolderPlus } from "react-icons/fi";
|
||||
import {
|
||||
ForwardedRef,
|
||||
forwardRef,
|
||||
useContext,
|
||||
useEffect,
|
||||
useState,
|
||||
} from "react";
|
||||
import { ForwardedRef, forwardRef, useContext, useState } from "react";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { ChatSession } from "../interfaces";
|
||||
|
||||
import { NEXT_PUBLIC_NEW_CHAT_DIRECTS_TO_SAME_PERSONA } from "@/lib/constants";
|
||||
|
||||
import { Folder } from "../folders/interfaces";
|
||||
import { createFolder } from "../folders/FolderManagement";
|
||||
import { usePopup } from "@/components/admin/connectors/Popup";
|
||||
|
@ -4,23 +4,22 @@ import { HeaderTitle } from "@/components/header/HeaderTitle";
|
||||
import { Logo } from "@/components/Logo";
|
||||
import { SettingsContext } from "@/components/settings/SettingsProvider";
|
||||
import { NEXT_PUBLIC_DO_NOT_USE_TOGGLE_OFF_DANSWER_POWERED } from "@/lib/constants";
|
||||
import Link from "next/link";
|
||||
import { useContext } from "react";
|
||||
import { FiSidebar } from "react-icons/fi";
|
||||
|
||||
export default function FixedLogo({
|
||||
toggleSidebar = () => null,
|
||||
}: {
|
||||
toggleSidebar?: () => void;
|
||||
}) {
|
||||
export default function FixedLogo() {
|
||||
const combinedSettings = useContext(SettingsContext);
|
||||
const settings = combinedSettings?.settings;
|
||||
const enterpriseSettings = combinedSettings?.enterpriseSettings;
|
||||
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
onClick={toggleSidebar}
|
||||
className="fixed cursor-pointer flex z-40 left-2.5 top-2"
|
||||
<Link
|
||||
href={
|
||||
settings && settings.default_page === "chat" ? "/chat" : "/search"
|
||||
}
|
||||
className="fixed cursor-pointer flex z-40 left-2.5 top-2"
|
||||
>
|
||||
<div className="max-w-[200px] mobile:hidden flex items-center gap-x-1 my-auto">
|
||||
<div className="flex-none my-auto">
|
||||
@ -39,7 +38,7 @@ export default function FixedLogo({
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
<div className="mobile:hidden fixed left-2.5 bottom-4">
|
||||
<FiSidebar />
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user