Skip to content

Commit a54bdc4

Browse files
committed
Use Array.from pattern instead of array constructor.
This pattern is more verbose.
1 parent 80307ea commit a54bdc4

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

apps/dashboard/app/(main)/websites/[id]/revenue/_components/recent-transactions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function RecentTransactions({
4242
if (isLoading) {
4343
return (
4444
<div className="space-y-3">
45-
{[...new Array(5)].map((_, i) => (
45+
{Array.from({ length: 5 }).map((_, i) => (
4646
<TransactionSkeleton key={i} />
4747
))}
4848
</div>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const PageHeaderSkeleton = () => (
8989

9090
const RevenueMetricsSkeleton = () => (
9191
<div className="grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 md:grid-cols-3 lg:grid-cols-4">
92-
{[...new Array(4)].map((_, i) => (
92+
{Array.from({ length: 4 }).map((_, i) => (
9393
<div
9494
className="overflow-hidden rounded-lg border bg-card"
9595
key={`${i + 1}-metrics-skeleton`}

0 commit comments

Comments
 (0)