Home / File/ page.tsx — ui Source File

page.tsx — ui Source File

Architecture documentation for page.tsx, a tsx file in the ui codebase. 4 imports, 0 dependents.

File tsx DocumentationAtlas Changelog 4 imports 2 functions

Entity Profile

Dependency Diagram

graph LR
  b56c20d3_b39a_0da0_4721_0ff8f542daf6["page.tsx"]
  68b933cf_7ffc_0fbc_a41d_80f8f6fa24c1["blocks"]
  b56c20d3_b39a_0da0_4721_0ff8f542daf6 --> 68b933cf_7ffc_0fbc_a41d_80f8f6fa24c1
  47f80ba4_67d7_ee87_16e0_b2f8270261e4["categories"]
  b56c20d3_b39a_0da0_4721_0ff8f542daf6 --> 47f80ba4_67d7_ee87_16e0_b2f8270261e4
  674c271b_4f42_1739_f1f5_3d3fcc5d6d05["block-display"]
  b56c20d3_b39a_0da0_4721_0ff8f542daf6 --> 674c271b_4f42_1739_f1f5_3d3fcc5d6d05
  b5745d66_2f51_7fb8_758d_e409c7f36c09["_legacy-styles"]
  b56c20d3_b39a_0da0_4721_0ff8f542daf6 --> b5745d66_2f51_7fb8_758d_e409c7f36c09
  style b56c20d3_b39a_0da0_4721_0ff8f542daf6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { getAllBlockIds } from "@/lib/blocks"
import { registryCategories } from "@/lib/categories"
import { BlockDisplay } from "@/components/block-display"
import { getActiveStyle } from "@/registry/_legacy-styles"

export const revalidate = false
export const dynamic = "force-static"
export const dynamicParams = false

export async function generateStaticParams() {
  return registryCategories.map((category) => ({
    categories: [category.slug],
  }))
}

export default async function BlocksPage({
  params,
}: {
  params: Promise<{ categories?: string[] }>
}) {
  const [{ categories = [] }, activeStyle] = await Promise.all([
    params,
    getActiveStyle(),
  ])
  const blocks = await getAllBlockIds(["registry:block"], categories)

  return (
    <div className="flex flex-col gap-12 md:gap-24">
      {blocks.map((name) => (
        <BlockDisplay name={name} key={name} styleName={activeStyle.name} />
      ))}
    </div>
  )
}

Subdomains

Dependencies

  • _legacy-styles
  • block-display
  • blocks
  • categories

Frequently Asked Questions

What does page.tsx do?
page.tsx is a source file in the ui codebase, written in tsx. It belongs to the DocumentationAtlas domain, Changelog subdomain.
What functions are defined in page.tsx?
page.tsx defines 2 function(s): BlocksPage, generateStaticParams.
What does page.tsx depend on?
page.tsx imports 4 module(s): _legacy-styles, block-display, blocks, categories.
Where is page.tsx in the architecture?
page.tsx is located at apps/v4/app/(app)/blocks/[...categories]/page.tsx (domain: DocumentationAtlas, subdomain: Changelog, directory: apps/v4/app/(app)/blocks/[...categories]).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free