Skip to content

Commit b039a53

Browse files
committed
fix: export data
1 parent 8da6a1d commit b039a53

File tree

1 file changed

+32
-29
lines changed
  • apps/dashboard/app/(main)/websites/[id]/settings/export

1 file changed

+32
-29
lines changed

apps/dashboard/app/(main)/websites/[id]/settings/export/page.tsx

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import {
44
CheckIcon,
55
DownloadIcon,
66
FileCodeIcon,
7-
TableIcon,
87
FileTextIcon,
8+
TableIcon,
99
} from "@phosphor-icons/react";
1010
import dayjs from "dayjs";
1111
import { useParams } from "next/navigation";
@@ -124,35 +124,38 @@ export default function ExportPage() {
124124
<Label className="font-medium text-sm">Export format</Label>
125125
</div>
126126
<div className="grid grid-cols-1 gap-3 sm:grid-cols-3">
127-
{formatOptions.map((format) => (
128-
<button
129-
className={`flex items-start gap-3 rounded-md border p-4 text-left transition-colors hover:border-primary/50 ${
130-
selectedFormat === format.value
131-
? "border-primary bg-primary/5"
132-
: "border-border"
133-
}`}
134-
key={format.value}
135-
onClick={() => setSelectedFormat(format.value)}
136-
type="button"
137-
>
138-
<div className="flex h-8 w-8 items-center justify-center rounded-md bg-muted">
139-
<format.icon className="h-5 w-5" />
140-
</div>
141-
<div className="min-w-0 flex-1">
142-
<div className="mb-1 flex items-center gap-2">
143-
<span className="font-medium text-sm">
144-
{format.label}
145-
</span>
146-
{selectedFormat === format.value && (
147-
<CheckIcon className="h-4 w-4 text-primary" />
148-
)}
127+
{formatOptions.map((format) => {
128+
const IconComponent = format.icon;
129+
return (
130+
<button
131+
className={`flex items-start gap-3 rounded-md border p-4 text-left transition-colors hover:border-primary/50 ${
132+
selectedFormat === format.value
133+
? "border-primary bg-primary/5"
134+
: "border-border"
135+
}`}
136+
key={format.value}
137+
onClick={() => setSelectedFormat(format.value)}
138+
type="button"
139+
>
140+
<div className="flex h-8 w-8 items-center justify-center rounded-md bg-muted">
141+
<IconComponent className="h-5 w-5" />
142+
</div>
143+
<div className="min-w-0 flex-1">
144+
<div className="mb-1 flex items-center gap-2">
145+
<span className="font-medium text-sm">
146+
{format.label}
147+
</span>
148+
{selectedFormat === format.value && (
149+
<CheckIcon className="h-4 w-4 text-primary" />
150+
)}
151+
</div>
152+
<p className="text-muted-foreground text-xs">
153+
{format.description}
154+
</p>
149155
</div>
150-
<p className="text-muted-foreground text-xs">
151-
{format.description}
152-
</p>
153-
</div>
154-
</button>
155-
))}
156+
</button>
157+
);
158+
})}
156159
</div>
157160
</section>
158161

0 commit comments

Comments
 (0)