Skip to content

Commit c5cd16f

Browse files
committed
refactor: clean up registry components and improve code readability
- Removed unnecessary blank lines and improved formatting in various components for better readability. - Added a new route for handling registry searches with query parameters for frameworks, categories, and authors. - Introduced a new TAGS structure for managing framework tags and their aliases. - Updated the loadCodemod function to enhance error handling and streamline API calls. - Refactored the DesktopFilters and RegistryCard components to improve layout and maintainability.
1 parent 949033c commit c5cd16f

File tree

11 files changed

+511
-92
lines changed

11 files changed

+511
-92
lines changed

apps/frontend/app/(website)/registry/[codemod]/route.tsx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,22 @@ import { loadCodemod } from "@/data/codemod/loaders";
22
import type { AutomationResponse } from "@/types/object.types";
33
import { type NextRequest, NextResponse } from "next/server";
44

5-
export async function GET(req: NextRequest, { params }: { params: { codemod: string } }) {
5+
export async function GET(
6+
req: NextRequest,
7+
{ params }: { params: { codemod: string } },
8+
) {
69
const { codemod } = params;
710

8-
911
try {
10-
const initialAutomationData = await loadCodemod(codemod, {
11-
next: {
12-
tags: [`codemod-${codemod}`],
12+
const initialAutomationData = await loadCodemod(
13+
codemod,
14+
{
15+
next: {
16+
tags: [`codemod-${codemod}`],
17+
},
1318
},
14-
}, true);
19+
true,
20+
);
1521

1622
const name = (initialAutomationData as AutomationResponse).name;
1723

@@ -25,8 +31,6 @@ export async function GET(req: NextRequest, { params }: { params: { codemod: str
2531
status: 301,
2632
});
2733
} catch (error) {
28-
return NextResponse.redirect(`https://app.codemod.com/registry`, {
29-
status: 301,
30-
});
34+
console.log(error);
3135
}
3236
}

0 commit comments

Comments
 (0)