Skip to content

Commit 58d1166

Browse files
committed
feat: cleanup
1 parent 034ce2b commit 58d1166

File tree

5 files changed

+29
-19
lines changed

5 files changed

+29
-19
lines changed

apps/dashboard/app/(main)/organizations/components/organization-provider.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ export function OrganizationProvider({
158158
if (requiresOrg && !activeOrganization) {
159159
return (
160160
<div className="flex h-full flex-col">
161-
{/* Header */}
162161
<div className="border-b bg-gradient-to-r from-background via-background to-muted/20">
163162
<div className="flex flex-col justify-between gap-3 p-4 sm:flex-row sm:items-center sm:gap-0 sm:px-6 sm:py-6">
164163
<div className="min-w-0 flex-1">
@@ -228,7 +227,6 @@ export function OrganizationProvider({
228227

229228
return (
230229
<div className="flex h-full flex-col">
231-
{/* Header */}
232230
<div className="border-b bg-gradient-to-r from-background via-background to-muted/20">
233231
<div className="flex flex-col justify-between gap-3 p-4 sm:flex-row sm:items-center sm:gap-0 sm:px-6 sm:py-6">
234232
<div className="min-w-0 flex-1">
@@ -272,7 +270,6 @@ export function OrganizationProvider({
272270
onClose={() => setShowCreateDialog(false)}
273271
/>
274272

275-
{/* Invite Member Dialog */}
276273
{activeOrganization && (
277274
<InviteMemberDialog
278275
onOpenChange={setShowInviteMemberDialog}
@@ -281,7 +278,6 @@ export function OrganizationProvider({
281278
/>
282279
)}
283280

284-
{/* API Key Creation Dialog */}
285281
{activeOrganization && (
286282
<ApiKeyCreateDialog
287283
onOpenChange={setShowCreateApiKeyDialog}

apps/dashboard/app/(main)/organizations/invitations/invitations-view.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import type {
1414
ActiveOrganization,
1515
Organization,
1616
} from '@/hooks/use-organizations';
17-
import type { InvitationTab } from '@/stores/jotai/organizationAtoms';
1817
import { InvitationList } from './invitation-list';
1918

2019
function InvitationsSkeleton() {

apps/dashboard/app/(main)/organizations/settings/danger/danger-zone-settings.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,8 @@ export function DangerZoneSettings({ organization }: DangerZoneSettingsProps) {
7171
</div>
7272
</CardHeader>
7373
<CardContent className="space-y-6">
74-
{/* Transfer Assets Section */}
7574
<TransferAssets organizationId={organization.id} />
7675

77-
{/* Delete Organization Section */}
7876
<div className="rounded border border-destructive/20 bg-destructive/5 p-4">
7977
<div className="flex items-start justify-between">
8078
<div className="flex-1">
@@ -100,7 +98,6 @@ export function DangerZoneSettings({ organization }: DangerZoneSettingsProps) {
10098
</CardContent>
10199
</Card>
102100

103-
{/* Delete Confirmation Dialog */}
104101
<AlertDialog onOpenChange={setShowDeleteDialog} open={showDeleteDialog}>
105102
<AlertDialogContent>
106103
<AlertDialogHeader>

apps/dashboard/app/(main)/organizations/settings/danger/transfer-assets.tsx

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { ArrowRightIcon, BuildingsIcon, UserIcon } from '@phosphor-icons/react';
44
import { useState } from 'react';
55
import { toast } from 'sonner';
6+
import { FaviconImage } from '@/components/analytics/favicon-image';
67
import { Button } from '@/components/ui/button';
78
import {
89
Card,
@@ -165,9 +166,17 @@ export function TransferAssets({ organizationId }: { organizationId: string }) {
165166
: 'animate-[slide-left_1s_ease-in-out]'
166167
}`}
167168
>
168-
<div className="rounded bg-primary/20 p-1">
169-
<UserIcon className="h-3 w-3 text-primary" size={12} />
170-
</div>
169+
<FaviconImage
170+
altText={`${transferringWebsite.name} favicon`}
171+
className="rounded"
172+
domain={transferringWebsite.domain}
173+
fallbackIcon={
174+
<div className="rounded bg-primary/20 p-1">
175+
<UserIcon className="h-3 w-3 text-primary" size={12} />
176+
</div>
177+
}
178+
size={16}
179+
/>
171180
<div className="min-w-0">
172181
<p className="truncate font-medium text-foreground text-xs">
173182
{transferringWebsite.name}
@@ -212,7 +221,7 @@ export function TransferAssets({ organizationId }: { organizationId: string }) {
212221
</CardHeader>
213222
<CardContent className="pt-0">
214223
<WebsiteSelector
215-
onSelectWebsite={setSelectedWebsite}
224+
onSelectWebsiteAction={setSelectedWebsite}
216225
selectedWebsite={selectedWebsite}
217226
websites={personalWebsites}
218227
/>
@@ -257,7 +266,7 @@ export function TransferAssets({ organizationId }: { organizationId: string }) {
257266
</CardHeader>
258267
<CardContent className="pt-0">
259268
<WebsiteSelector
260-
onSelectWebsite={setSelectedWebsite}
269+
onSelectWebsiteAction={setSelectedWebsite}
261270
selectedWebsite={selectedWebsite}
262271
websites={organizationWebsites}
263272
/>

apps/dashboard/app/(main)/organizations/settings/danger/website-selector.tsx

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

33
import type { Website } from '@databuddy/shared';
44
import { GlobeIcon } from '@phosphor-icons/react';
5+
import { FaviconImage } from '@/components/analytics/favicon-image';
56
import { cn } from '@/lib/utils';
67

78
function WebsiteCard({
@@ -24,9 +25,17 @@ function WebsiteCard({
2425
onClick={onClick}
2526
type="button"
2627
>
27-
<div className="flex-shrink-0 rounded bg-primary/10 p-1">
28-
<GlobeIcon className="h-3 w-3 text-primary" size={12} />
29-
</div>
28+
<FaviconImage
29+
altText={`${website.name} favicon`}
30+
className="flex-shrink-0 rounded"
31+
domain={website.domain}
32+
fallbackIcon={
33+
<div className="rounded bg-primary/10 p-1">
34+
<GlobeIcon className="h-3 w-3 text-primary" size={12} />
35+
</div>
36+
}
37+
size={16}
38+
/>
3039
<div className="min-w-0 flex-1">
3140
<p className="truncate font-medium text-foreground text-xs">
3241
{website.name}
@@ -42,11 +51,11 @@ function WebsiteCard({
4251
export function WebsiteSelector({
4352
websites,
4453
selectedWebsite,
45-
onSelectWebsite,
54+
onSelectWebsiteAction,
4655
}: {
4756
websites: Website[];
4857
selectedWebsite: string | null;
49-
onSelectWebsite: (id: string | null) => void;
58+
onSelectWebsiteAction: (id: string | null) => void;
5059
}) {
5160
return (
5261
<div className="max-h-48 space-y-1 overflow-y-auto p-1">
@@ -55,7 +64,7 @@ export function WebsiteSelector({
5564
<WebsiteCard
5665
key={website.id}
5766
onClick={() =>
58-
onSelectWebsite(
67+
onSelectWebsiteAction(
5968
website.id === selectedWebsite ? null : website.id
6069
)
6170
}

0 commit comments

Comments
 (0)