mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-02 12:22:40 +02:00
chore: linting
This commit is contained in:
parent
050581ba6a
commit
a3a5b13f48
17 changed files with 104 additions and 69 deletions
|
|
@ -208,14 +208,16 @@ const ConnectorSelector = React.memo(
|
|||
{getConnectorIcon(docType.type, "h-3 w-3")}
|
||||
</div>
|
||||
))}
|
||||
{selectedLiveConnectors.slice(0, 3 - selectedDocTypes.slice(0, 2).length).map((connector) => (
|
||||
<div
|
||||
key={connector.id}
|
||||
className="flex h-6 w-6 items-center justify-center rounded-full border-2 border-background bg-muted"
|
||||
>
|
||||
{getConnectorIcon(connector.connector_type, "h-3 w-3")}
|
||||
</div>
|
||||
))}
|
||||
{selectedLiveConnectors
|
||||
.slice(0, 3 - selectedDocTypes.slice(0, 2).length)
|
||||
.map((connector) => (
|
||||
<div
|
||||
key={connector.id}
|
||||
className="flex h-6 w-6 items-center justify-center rounded-full border-2 border-background bg-muted"
|
||||
>
|
||||
{getConnectorIcon(connector.connector_type, "h-3 w-3")}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<span className="text-xs font-medium">
|
||||
{totalSelectedCount} {totalSelectedCount === 1 ? "source" : "sources"}
|
||||
|
|
@ -240,7 +242,7 @@ const ConnectorSelector = React.memo(
|
|||
</DialogDescription>
|
||||
</div>
|
||||
|
||||
{(isLoading || connectorsLoading) ? (
|
||||
{isLoading || connectorsLoading ? (
|
||||
<div className="flex justify-center py-8">
|
||||
<div className="animate-spin h-8 w-8 border-3 border-primary border-t-transparent rounded-full" />
|
||||
</div>
|
||||
|
|
@ -293,9 +295,7 @@ const ConnectorSelector = React.memo(
|
|||
</div>
|
||||
<div className="flex-1 text-left min-w-0">
|
||||
<div className="flex items-center gap-2">
|
||||
<p className="text-sm font-medium truncate">
|
||||
{connector.name}
|
||||
</p>
|
||||
<p className="text-sm font-medium truncate">{connector.name}</p>
|
||||
{isSelected && (
|
||||
<div className="flex h-5 w-5 items-center justify-center rounded-full bg-primary">
|
||||
<Check className="h-3 w-3 text-primary-foreground" />
|
||||
|
|
@ -590,7 +590,6 @@ const LLMSelector = React.memo(() => {
|
|||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</SelectItem>
|
||||
))}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
import Image from "next/image";
|
||||
|
||||
import {
|
||||
AlertCircle,
|
||||
BookOpen,
|
||||
|
|
@ -20,6 +17,8 @@ import {
|
|||
Trash2,
|
||||
Undo2,
|
||||
} from "lucide-react";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { memo, useMemo } from "react";
|
||||
|
||||
import { Logo } from "@/components/Logo";
|
||||
|
|
@ -36,7 +35,6 @@ import {
|
|||
SidebarMenuItem,
|
||||
} from "@/components/ui/sidebar";
|
||||
|
||||
|
||||
// Map of icon names to their components
|
||||
export const iconMap: Record<string, LucideIcon> = {
|
||||
BookOpen,
|
||||
|
|
@ -218,21 +216,21 @@ export const AppSidebar = memo(function AppSidebar({
|
|||
<SidebarMenu>
|
||||
<SidebarMenuItem>
|
||||
<SidebarMenuButton asChild size="lg">
|
||||
<Link href="/" className="flex items-center gap-2 w-full">
|
||||
<div className="bg-sidebar-primary text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-lg">
|
||||
<Image
|
||||
src="/icon-128.png"
|
||||
alt="SurfSense logo"
|
||||
width={32}
|
||||
height={32}
|
||||
className="rounded-lg"
|
||||
/>
|
||||
</div>
|
||||
<div className="grid flex-1 text-left text-sm leading-tight">
|
||||
<span className="truncate font-medium">SurfSense</span>
|
||||
<span className="truncate text-xs">beta v0.0.8</span>
|
||||
</div>
|
||||
</Link>
|
||||
<Link href="/" className="flex items-center gap-2 w-full">
|
||||
<div className="bg-sidebar-primary text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-lg">
|
||||
<Image
|
||||
src="/icon-128.png"
|
||||
alt="SurfSense logo"
|
||||
width={32}
|
||||
height={32}
|
||||
className="rounded-lg"
|
||||
/>
|
||||
</div>
|
||||
<div className="grid flex-1 text-left text-sm leading-tight">
|
||||
<span className="truncate font-medium">SurfSense</span>
|
||||
<span className="truncate text-xs">beta v0.0.8</span>
|
||||
</div>
|
||||
</Link>
|
||||
</SidebarMenuButton>
|
||||
</SidebarMenuItem>
|
||||
</SidebarMenu>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue