Skip to content

Commit 63bded4

Browse files
committed
fix: bunch of UI fixes
1 parent fbb1d08 commit 63bded4

File tree

7 files changed

+29
-24
lines changed

7 files changed

+29
-24
lines changed

apps/dashboard/app/(main)/websites/[id]/_components/filters-section.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export function FiltersSection({
6565
return (
6666
<div
6767
className="inline-flex items-center gap-1 rounded bg-muted/50 px-2 py-1 text-sm transition-colors hover:bg-muted/70"
68-
key={`filter-${index}-${filter.field}-${filter.operator}`}
68+
key={`filter-${filter.field}-${filter.operator}-${Array.isArray(filter.value) ? filter.value.join('-') : filter.value}-${index}`}
6969
>
7070
<span
7171
className="truncate font-medium text-foreground"

apps/dashboard/app/(main)/websites/[id]/_components/utils/add-filters.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ function FilterForm({
262262
{Array.from({ length: Math.min(numberOfFilters, 5) }, (_, index) => (
263263
<Skeleton
264264
className="h-8 w-full"
265-
key={`filter-skeleton-${index}-${numberOfFilters}`}
265+
key={`filter-skeleton-${index}`}
266266
/>
267267
))}
268268
</div>

apps/dashboard/components/analytics/map-component.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -325,24 +325,21 @@ export function MapComponent({
325325

326326
const zoom = resolvedHeight ? Math.log2(resolvedHeight / 400) + 1 : 1;
327327

328-
// Fix map background color after mount
329328
useEffect(() => {
330329
if (mapRef.current) {
331330
const mapContainer = mapRef.current.getContainer();
332331
if (mapContainer) {
333-
const bgColor = resolvedTheme === 'dark' ? '#1f2937' : '#f8fafc';
332+
const bgColor = 'hsl(var(--background))';
334333
mapContainer.style.backgroundColor = bgColor;
335-
// Also set it on the leaflet-container class
336334
const leafletContainer =
337335
mapContainer.querySelector('.leaflet-container');
338-
if (leafletContainer) {
336+
if (leafletContainer) {
339337
(leafletContainer as HTMLElement).style.backgroundColor = bgColor;
340338
}
341339
}
342340
}
343341
}, [resolvedTheme]);
344342

345-
// Helper function to calculate country centroid
346343
const calculateCountryCentroid = useCallback(
347344
(geometry: Country['features'][number]['geometry']) => {
348345
let centroidLat = 0;
@@ -444,10 +441,7 @@ export function MapComponent({
444441
ref={mapRef}
445442
style={{
446443
height: '100%',
447-
backgroundColor:
448-
resolvedTheme === 'dark'
449-
? '#1f2937 !important'
450-
: '#fffff !important',
444+
backgroundColor: 'hsl(var(--background))',
451445
cursor: 'default',
452446
outline: 'none',
453447
zIndex: '1',

apps/dashboard/components/layout/category-sidebar.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { InfoIcon } from '@phosphor-icons/react';
44
import dynamic from 'next/dynamic';
55
import Image from 'next/image';
6+
import Link from 'next/link';
67
import { usePathname } from 'next/navigation';
78
import { useMemo, useState } from 'react';
89
import { NotificationsPopover } from '@/components/notifications/notifications-popover';
@@ -58,7 +59,10 @@ export function CategorySidebar({
5859
<div className="flex h-full flex-col">
5960
{/* Logo */}
6061
<div className="flex h-16 items-center justify-center border-border border-b">
61-
<div className="relative flex-shrink-0">
62+
<Link
63+
className="relative flex-shrink-0 transition-opacity hover:opacity-80"
64+
href="/websites"
65+
>
6266
<Image
6367
alt="DataBuddy Logo"
6468
className="drop-shadow-sm invert dark:invert-0"
@@ -67,7 +71,7 @@ export function CategorySidebar({
6771
src="/logo.svg"
6872
width={32}
6973
/>
70-
</div>
74+
</Link>
7175
</div>
7276
{categories.map((category) => {
7377
const Icon = category.icon;

apps/dashboard/components/layout/navigation/navigation-config.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ export const websiteNavigation: NavigationSection[] = [
247247
icon: UsersIcon,
248248
items: [
249249
{
250-
name: 'User Profiles',
250+
name: 'Profiles',
251251
icon: UserCircleIcon,
252252
href: '/profiles',
253253
},

apps/dashboard/components/layout/organization-selector.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -190,15 +190,18 @@ export function OrganizationSelector() {
190190

191191
if (isLoading) {
192192
return (
193-
<div className="border-border border-b bg-accent/20 px-5 py-3">
194-
<div className="flex items-center gap-3">
195-
<div className="rounded-lg bg-background/80 p-1.5 shadow-sm ring-1 ring-border/50">
196-
<Skeleton className="h-5 w-5 rounded" />
197-
</div>
198-
<div className="space-y-1">
199-
<Skeleton className="h-4 w-24 rounded" />
200-
<Skeleton className="h-3 w-16 rounded" />
193+
<div className="flex h-16 w-full items-center border-border border-b bg-accent/20 px-5 py-3">
194+
<div className="flex w-full items-center justify-between">
195+
<div className="flex items-center gap-3">
196+
<div className="rounded-lg bg-background/80 p-1.5 shadow-sm ring-1 ring-border/50">
197+
<Skeleton className="h-5 w-5 rounded" />
198+
</div>
199+
<div className="flex min-w-0 flex-1 flex-col items-start">
200+
<Skeleton className="h-4 w-24 rounded" />
201+
<Skeleton className="mt-1 h-3 w-16 rounded" />
202+
</div>
201203
</div>
204+
<Skeleton className="h-4 w-4 rounded" />
202205
</div>
203206
</div>
204207
);

apps/dashboard/components/layout/sidebar.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import { ListIcon, XIcon } from '@phosphor-icons/react';
44
import Image from 'next/image';
5+
import Link from 'next/link';
56
import { usePathname } from 'next/navigation';
67
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
78
import { Button } from '@/components/ui/button';
@@ -160,7 +161,10 @@ export function Sidebar() {
160161
<ListIcon className="h-5 w-5" weight="duotone" />
161162
</Button>
162163

163-
<div className="flex items-center gap-2">
164+
<Link
165+
className="flex items-center gap-2 transition-opacity hover:opacity-80"
166+
href="/websites"
167+
>
164168
<div className="flex h-8 w-8 items-center justify-center">
165169
<Image
166170
alt="Databuddy Logo"
@@ -172,7 +176,7 @@ export function Sidebar() {
172176
/>
173177
</div>
174178
<span className="font-semibold text-lg">Databuddy</span>
175-
</div>
179+
</Link>
176180
</div>
177181
</div>
178182
</header>

0 commit comments

Comments
 (0)