Skip to content

Commit 0c2cbc8

Browse files
committed
refactor: dynamically import transformers pipeline and rename File icon import to FileIcon.
1 parent f32dff0 commit 0c2cbc8

File tree

3 files changed

+29
-17
lines changed

3 files changed

+29
-17
lines changed

src/components/DashboardViews/NotificationCenter.tsx

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { supabase } from '../../config/supabase';
88

99
interface NotificationCenterProps {
1010
isDark: boolean;
11+
className?: string;
1112
}
1213

1314
interface NotificationEntry {
@@ -54,7 +55,7 @@ function timeAgo(dateStr: string): string {
5455
return date.toLocaleDateString(undefined, { month: 'short', day: 'numeric' });
5556
}
5657

57-
export default function NotificationCenter({ isDark }: NotificationCenterProps) {
58+
export default function NotificationCenter({ isDark, className }: NotificationCenterProps) {
5859
const [open, setOpen] = useState(false);
5960
const [loading, setLoading] = useState(false);
6061
const [notifications, setNotifications] = useState<NotificationEntry[]>([]);
@@ -144,18 +145,25 @@ export default function NotificationCenter({ isDark }: NotificationCenterProps)
144145
};
145146

146147
return (
147-
<div className="relative" ref={dropdownRef}>
148+
<div className={cn("relative", className)} ref={dropdownRef}>
148149
{/* Bell Button */}
149150
<button
150151
onClick={() => setOpen(!open)}
151152
className={cn(
152-
"relative p-2 rounded-lg transition-colors",
153-
isDark ? "hover:bg-white/10 text-white/60 hover:text-white" : "hover:bg-black/5 text-black/50 hover:text-black"
153+
"relative inline-flex h-8 w-8 items-center justify-center rounded-full border transition-colors",
154+
isDark
155+
? "border-white/10 bg-white/5 text-white/70 hover:bg-white/10 hover:text-white"
156+
: "border-black/10 bg-black/5 text-black/60 hover:bg-black/10 hover:text-black"
154157
)}
155158
>
156-
<Bell className="w-4.5 h-4.5" />
159+
<Bell className="h-4 w-4" />
157160
{unreadCount > 0 && (
158-
<span className="absolute -top-0.5 -right-0.5 w-4.5 h-4.5 flex items-center justify-center rounded-full bg-red-500 text-[9px] font-bold text-white leading-none">
161+
<span
162+
className={cn(
163+
"absolute -top-1 -right-1 flex h-4 w-4 items-center justify-center rounded-full bg-[#FF8A5B] text-[9px] font-bold text-white leading-none ring-2",
164+
isDark ? "ring-[#0A0A0A]" : "ring-white"
165+
)}
166+
>
159167
{unreadCount > 9 ? '9+' : unreadCount}
160168
</span>
161169
)}
@@ -164,8 +172,9 @@ export default function NotificationCenter({ isDark }: NotificationCenterProps)
164172
{/* Dropdown */}
165173
{open && (
166174
<div className={cn(
167-
"absolute right-0 top-full mt-2 w-[380px] max-h-[480px] rounded-xl border shadow-2xl z-[100] flex flex-col overflow-hidden",
168-
isDark ? "bg-[#121214] border-white/10 shadow-black/50" : "bg-white border-gray-200 shadow-lg shadow-gray-200/50"
175+
"absolute top-full mt-3 w-[min(92vw,380px)] max-h-[480px] rounded-2xl border shadow-2xl z-[100] flex flex-col overflow-hidden backdrop-blur-xl",
176+
"left-1/2 -translate-x-1/2 sm:left-auto sm:right-0 sm:translate-x-0",
177+
isDark ? "bg-[#0F0F12]/95 border-white/10 shadow-black/60" : "bg-white/95 border-gray-200 shadow-lg shadow-gray-200/50"
169178
)}>
170179
{/* Header */}
171180
<div className={cn("px-4 py-3 border-b flex items-center justify-between shrink-0", isDark ? "border-white/10" : "border-gray-100")}>
@@ -209,8 +218,8 @@ export default function NotificationCenter({ isDark }: NotificationCenterProps)
209218
onClick={() => { if (!n.is_read) markRead(n.id); }}
210219
className={cn(
211220
"px-4 py-3 flex items-start gap-3 transition-colors cursor-pointer",
212-
!n.is_read && (isDark ? "bg-purple-500/[0.03]" : "bg-blue-50/50"),
213-
isDark ? "hover:bg-white/[0.02]" : "hover:bg-gray-50/50"
221+
!n.is_read && (isDark ? "bg-[#FF8A5B]/[0.06]" : "bg-orange-50/60"),
222+
isDark ? "hover:bg-white/[0.04]" : "hover:bg-gray-50/60"
214223
)}
215224
>
216225
<div className={cn("p-1.5 rounded-lg shrink-0 mt-0.5", TYPE_COLORS[n.type] || TYPE_COLORS.info)}>
@@ -219,7 +228,7 @@ export default function NotificationCenter({ isDark }: NotificationCenterProps)
219228
<div className="flex-1 min-w-0">
220229
<div className="flex items-center gap-1.5">
221230
<span className={cn("text-xs font-semibold", isDark ? "text-white" : "text-gray-900")}>{n.title}</span>
222-
{!n.is_read && <div className="w-1.5 h-1.5 rounded-full bg-purple-500 shrink-0" />}
231+
{!n.is_read && <div className="w-1.5 h-1.5 rounded-full bg-[#FF8A5B] shrink-0" />}
223232
</div>
224233
{n.message && (
225234
<p className={cn("text-[11px] mt-0.5 line-clamp-2", isDark ? "text-white/40" : "text-gray-500")}>{n.message}</p>

src/pages/DemoDashboard.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ function DemoDashboardContent() {
126126
<TopBanner />
127127
{/* Top Bar with Trigger */}
128128
<div className={cn(
129-
"flex items-center justify-between px-4 py-3 border-b backdrop-blur-md",
129+
"relative flex items-center justify-between px-4 py-3 border-b backdrop-blur-md",
130130
isDark ? "bg-[rgb(10,10,10)]/80 border-white/10" : "bg-white/80 border-black/10"
131131
)}>
132132
<div className="flex items-center gap-4">
@@ -145,11 +145,14 @@ function DemoDashboardContent() {
145145
</button>
146146
</div>
147147
<div className="flex items-center gap-2">
148-
<NotificationCenter isDark={isDark} />
148+
<NotificationCenter
149+
isDark={isDark}
150+
className="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 sm:static sm:left-auto sm:top-auto sm:translate-x-0 sm:translate-y-0"
151+
/>
149152
<a
150153
href="/docs"
151154
className={cn(
152-
"text-sm font-medium transition-colors",
155+
"hidden sm:inline-flex text-sm font-medium transition-colors",
153156
isDark ? "text-white/60 hover:text-white" : "text-black/60 hover:text-black"
154157
)}
155158
>

src/pages/Solutions.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export default function Solutions() {
173173
];
174174

175175
return (
176-
<div className="relative min-h-screen overflow-x-hidden bg-[#0A0A0A]">
176+
<div className="relative min-h-screen overflow-x-hidden bg-[#0A0A0A] text-white">
177177
<SEO
178178
title="Solutions"
179179
description="Explore ClerkTree's autonomous operations solutions across voice agents, document intelligence, workflow orchestration, and enterprise monitoring."
@@ -291,10 +291,10 @@ export default function Solutions() {
291291
</span>
292292
</div>
293293

294-
<h3 className="mt-3 text-base font-medium tracking-[-0.02em] text-white/92 sm:mt-4 sm:text-lg">
294+
<h3 className="mt-3 text-base font-medium tracking-[-0.02em] text-white sm:mt-4 sm:text-lg">
295295
{stat.label}
296296
</h3>
297-
<p className="mt-2 max-w-xs text-sm leading-6 text-white/44">
297+
<p className="mt-2 max-w-xs text-sm leading-6 text-white/60">
298298
{stat.description}
299299
</p>
300300
</div>

0 commit comments

Comments
 (0)