Skip to content

Commit 74c4e47

Browse files
committed
Enhance comparisons
1 parent fb2b94a commit 74c4e47

File tree

7 files changed

+581
-174
lines changed

7 files changed

+581
-174
lines changed

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@
55
"packageManager": "[email protected]",
66
"scripts": {
77
"dev": "concurrently \"next dev\" \"pnpm stripe:webhook\"",
8-
"prebuild": "node scripts/check-metadata.js && node scripts/generate-collections.js && node scripts/create-vector-db-comparison-posts.js && node scripts/create-ai-assisted-dev-tools-comparison-post.js && node scripts/create-ai-assisted-dev-tools-comparison-pages.js",
8+
"prebuild": "node scripts/check-metadata.js && node scripts/generate-collections.js",
99
"build": "npm run prebuild && prisma generate && (prisma migrate deploy || echo 'Database migration failed, continuing with build...') && NODE_OPTIONS=--max-old-space-size=6144 next build",
1010
"build-no-db": "npm run prebuild && prisma generate && NODE_OPTIONS=--max-old-space-size=6144 next build",
1111
"build-with-tests": "npm run test && npm run prebuild && prisma generate && prisma migrate deploy && NODE_OPTIONS=--max-old-space-size=6144 next build",
1212
"build-only": "prisma generate && NODE_OPTIONS=--max-old-space-size=6144 next build",
1313
"start": "next start",
1414
"lint": "next lint",
1515
"stripe:webhook": "stripe listen --forward-to localhost:3000/api/webhooks/stripe",
16-
"debug-comparisons": "node scripts/create-ai-assisted-dev-tools-comparison-pages.js --debug",
1716
"check-metadata": "node scripts/check-metadata.js",
1817
"debug-metadata": "node scripts/check-metadata.js --debug",
1918
"grant-access": "node scripts/grant-free-access.js",
@@ -167,4 +166,4 @@
167166
"ts-node": "^10.9.2",
168167
"tsx": "^4.19.3"
169168
}
170-
}
169+
}

src/app/comparisons/page.jsx

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
import { SimpleLayout } from '@/components/SimpleLayout'
2-
import { getAllComparisons } from '@/lib/comparisons'
2+
import { getAllTools } from '@/actions/tool-actions'
33
import { createMetadata } from '@/utils/createMetadata'
4-
import ComparisonSearch from '@/components/ComparisonSearch'
4+
import { DynamicComparisonSearch } from '@/components/dynamic-comparison-search'
55

66
export const metadata = createMetadata({
7-
title: "Vector Database Comparisons",
8-
description: "Compare different vector databases side by side"
7+
title: "Developer Tool Comparisons",
8+
description: "Compare developer tools side by side to find the best fit for your needs"
99
});
1010

1111
export default async function ComparisonsIndex() {
12-
let comparisons = await getAllComparisons()
12+
const tools = await getAllTools()
1313

1414
return (
1515
<SimpleLayout
16-
title="Vector Database and Dev tools compared"
17-
intro="Compare different vector databases and devtools to find the best fit for your needs"
16+
title="Developer Tools Compared"
17+
intro="Compare developer tools side by side to find the perfect fit for your project needs. All comparisons are generated dynamically from our comprehensive database."
1818
>
19-
<ComparisonSearch comparisons={JSON.parse(JSON.stringify(comparisons))} />
19+
<DynamicComparisonSearch tools={tools} />
2020
</SimpleLayout>
2121
)
22-
}
22+
}
23+
24+
// Enable ISR with 1 hour revalidation
25+
export const revalidate = 3600

src/components/ComparisonPageLayout.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,5 @@ const ComparisonPageLayout = ({ tool1, tool2, proseParagraphs }) => {
129129
);
130130
};
131131

132-
export default ComparisonPageLayout;
132+
export default ComparisonPageLayout;
133+
export { ComparisonPageLayout };

src/components/ComparisonPageLayout.tsx

Lines changed: 0 additions & 155 deletions
This file was deleted.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import { Skeleton } from "@/components/ui/skeleton"
2+
3+
export function ComparisonPageSkeleton() {
4+
return (
5+
<div className="min-h-screen bg-gradient-to-b from-slate-50 to-white p-4">
6+
<div className="max-w-6xl mx-auto">
7+
{/* Hero section skeleton */}
8+
<div className="mb-8 bg-white rounded-xl shadow-md p-6">
9+
<div className="flex flex-col md:flex-row items-center justify-center gap-8 mb-6">
10+
<Skeleton className="h-24 w-24 rounded-xl" />
11+
<div className="text-center md:text-4xl text-2xl font-bold">vs</div>
12+
<Skeleton className="h-24 w-24 rounded-xl" />
13+
</div>
14+
<Skeleton className="h-8 w-3/4 mx-auto mb-4" />
15+
<Skeleton className="h-4 w-2/3 mx-auto" />
16+
</div>
17+
18+
{/* Newsletter section skeleton */}
19+
<Skeleton className="h-32 w-full rounded-lg mb-12" />
20+
21+
{/* Overview section skeleton */}
22+
<div className="mb-12">
23+
<Skeleton className="h-8 w-48 mb-6" />
24+
<Skeleton className="h-4 w-full mb-3" />
25+
<Skeleton className="h-4 w-full mb-3" />
26+
<Skeleton className="h-4 w-2/3" />
27+
</div>
28+
29+
{/* Pros/cons skeleton */}
30+
<Skeleton className="h-64 w-full rounded-lg mb-12" />
31+
32+
{/* Feature comparison skeleton */}
33+
<Skeleton className="h-96 w-full rounded-lg mb-12" />
34+
</div>
35+
</div>
36+
)
37+
}

0 commit comments

Comments
 (0)