mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-09-06 08:16:03 +00:00
fix lint errors in dashboard-view.tsx
- Replace non-null assertions with nullish coalescing fallbacks - Rename unused parameter with underscore prefix - Apply Biome formatting fixes Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
37a07184bf
commit
5259180cce
1 changed files with 20 additions and 11 deletions
|
|
@ -659,12 +659,14 @@ function RecentToolUsageCard({
|
|||
<p className="text-[12px] font-medium text-fg-secondary group-hover:text-white transition-colors leading-tight truncate">
|
||||
{item.name}
|
||||
</p>
|
||||
<span className={cn(
|
||||
"shrink-0 inline-flex items-center rounded-full px-1.5 py-px text-[8px] font-semibold uppercase tracking-wider",
|
||||
item.type === "MCP"
|
||||
? "bg-[#D4A853]/10 text-[#D4A853]/80"
|
||||
: "bg-[#4BA0FA]/10 text-[#4BA0FA]/80",
|
||||
)}>
|
||||
<span
|
||||
className={cn(
|
||||
"shrink-0 inline-flex items-center rounded-full px-1.5 py-px text-[8px] font-semibold uppercase tracking-wider",
|
||||
item.type === "MCP"
|
||||
? "bg-[#D4A853]/10 text-[#D4A853]/80"
|
||||
: "bg-[#4BA0FA]/10 text-[#4BA0FA]/80",
|
||||
)}
|
||||
>
|
||||
{item.type}
|
||||
</span>
|
||||
</div>
|
||||
|
|
@ -691,7 +693,10 @@ function RecentToolUsageCard({
|
|||
: "text-fg-faint",
|
||||
)}
|
||||
>
|
||||
{formatToolUsageTime(item.lastUsedAt, item.hasBeenUsed)}
|
||||
{formatToolUsageTime(
|
||||
item.lastUsedAt,
|
||||
item.hasBeenUsed,
|
||||
)}
|
||||
</span>
|
||||
</span>
|
||||
{/* Connected since */}
|
||||
|
|
@ -699,7 +704,11 @@ function RecentToolUsageCard({
|
|||
<>
|
||||
<span className="text-[#2A3040]">·</span>
|
||||
<span className="text-[9px] text-fg-faint">
|
||||
Since {item.connectedAt.toLocaleDateString(undefined, { month: "short", day: "numeric" })}
|
||||
Since{" "}
|
||||
{item.connectedAt.toLocaleDateString(undefined, {
|
||||
month: "short",
|
||||
day: "numeric",
|
||||
})}
|
||||
</span>
|
||||
</>
|
||||
)}
|
||||
|
|
@ -777,7 +786,7 @@ function RecommendedPluginsCard({
|
|||
return PLUGIN_STATIC.map((p) => ({
|
||||
...p,
|
||||
connected: connected[p.id] ?? false,
|
||||
onClick: onClicks[p.id]!,
|
||||
onClick: onClicks[p.id] ?? (() => {}),
|
||||
}))
|
||||
}, [hasMcp, connectedProviders, onOpenPlugins, onOpenIntegrations])
|
||||
|
||||
|
|
@ -949,7 +958,7 @@ function PluginPromoCard({
|
|||
return PLUGIN_STATIC.map((p) => ({
|
||||
...p,
|
||||
connected: connected[p.id] ?? false,
|
||||
onClick: onClicks[p.id]!,
|
||||
onClick: onClicks[p.id] ?? (() => {}),
|
||||
})).filter((p) => !p.connected)
|
||||
}, [hasMcp, connectedProviders, onOpenPlugins, onOpenIntegrations])
|
||||
|
||||
|
|
@ -1052,7 +1061,7 @@ export function DashboardView({
|
|||
onOpenSearch,
|
||||
onOpenIntegrations,
|
||||
onOpenPlugins,
|
||||
onNavigateToMemories,
|
||||
onNavigateToMemories: _onNavigateToMemories,
|
||||
onNavigateToGraph,
|
||||
onOpenDocument,
|
||||
onHighlightsChat,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue