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