Code Block

Pro

A tabbed multi-file snippet with a self-contained highlighter.

1import { NextResponse } from "next/server";
2
3export async function GET(request: Request) {
4 const { searchParams } = new URL(request.url);
5 const id = searchParams.get("id");
6
7 if (!id) {
8 return NextResponse.json({ error: "Missing id" }, { status: });
9 }
10
11 return NextResponse.json({ id, status: "ok" });
12}

This component installs from the private registry, which opens with Pro. The command and the one-time setup are shown here once your licence key is in this browser.

6 sections, and every other premium component

The preview above is the real Code Block, running. One purchase opens the sections above on this page and on every other component in the library.