Just show Khoj logo on title bar on small screens

Continue to show logo + text on larger screens
This commit is contained in:
Debanjum Singh Solanky
2024-08-02 12:17:11 +05:30
parent 3f607b3978
commit cab0957fd3
4 changed files with 58 additions and 9 deletions

View File

@@ -5,10 +5,8 @@ import styles from "./sidePanel.module.css";
import { useEffect, useState } from "react";
import { UserProfile, useAuthenticatedData } from "@/app/common/auth";
import { Avatar, AvatarImage, AvatarFallback } from "@/components/ui/avatar";
import Link from "next/link";
import useSWR from "swr";
import Image from "next/image";
import {
Command,
@@ -72,13 +70,12 @@ import {
import { Pencil, Trash, Share } from "@phosphor-icons/react";
import { Button, buttonVariants } from "@/components/ui/button";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "@/components/ui/alert-dialog";
import { modifyFileFilterForConversation } from "@/app/common/chatFunctions";
import { ScrollAreaScrollbar } from "@radix-ui/react-scroll-area";
import { KhojLogo } from "../logo/khogLogo";
import { KhojLogo, KhojLogoType } from "@/app/components/logo/khogLogo";
// Define a fetcher function
const fetcher = (url: string) => fetch(url).then((res) => res.json());
@@ -666,7 +663,7 @@ export default function SidePanel(props: SidePanelProps) {
<div className={`${styles.panel} ${enabled ? styles.expanded : styles.collapsed} mt-1`}>
<div className={`flex justify-between flex-row`}>
<Link href='/'>
<KhojLogo />
{props.isMobileWidth && <KhojLogo /> || <KhojLogoType />}
</Link>
{
authenticatedData && props.isMobileWidth ?