page.tsx — ui Source File
Architecture documentation for page.tsx, a tsx file in the ui codebase. 10 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 56e49ac2_e6e7_ad0b_a9c0_eda10335ae82["page.tsx"] 68708053_7b46_bfc9_eaf8_5335614bc08c["component-preview.tsx"] 56e49ac2_e6e7_ad0b_a9c0_eda10335ae82 --> 68708053_7b46_bfc9_eaf8_5335614bc08c 0d572c01_4780_e6b6_a66f_b4282c70ac19["ComponentPreview"] 56e49ac2_e6e7_ad0b_a9c0_eda10335ae82 --> 0d572c01_4780_e6b6_a66f_b4282c70ac19 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] 56e49ac2_e6e7_ad0b_a9c0_eda10335ae82 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 9c1a1e1b_87f8_29d5_c12d_e83869cf94e4["next"] 56e49ac2_e6e7_ad0b_a9c0_eda10335ae82 --> 9c1a1e1b_87f8_29d5_c12d_e83869cf94e4 f5b0b1d9_de2f_9c31_0bcd_4adbd07581cb["navigation"] 56e49ac2_e6e7_ad0b_a9c0_eda10335ae82 --> f5b0b1d9_de2f_9c31_0bcd_4adbd07581cb 8964a549_2e67_58d7_11c7_c9265d5c7971["config"] 56e49ac2_e6e7_ad0b_a9c0_eda10335ae82 --> 8964a549_2e67_58d7_11c7_c9265d5c7971 7a25f51b_551e_131b_bc51_bd5ccc7c308c["registry"] 56e49ac2_e6e7_ad0b_a9c0_eda10335ae82 --> 7a25f51b_551e_131b_bc51_bd5ccc7c308c 79081a1f_55a3_945a_fb8c_d53d6d3eab81["utils"] 56e49ac2_e6e7_ad0b_a9c0_eda10335ae82 --> 79081a1f_55a3_945a_fb8c_d53d6d3eab81 b5745d66_2f51_7fb8_758d_e409c7f36c09["_legacy-styles"] 56e49ac2_e6e7_ad0b_a9c0_eda10335ae82 --> b5745d66_2f51_7fb8_758d_e409c7f36c09 e7c93162_4e3c_98cb_1407_0e52b6ae64ed["legacy-themes.css"] 56e49ac2_e6e7_ad0b_a9c0_eda10335ae82 --> e7c93162_4e3c_98cb_1407_0e52b6ae64ed style 56e49ac2_e6e7_ad0b_a9c0_eda10335ae82 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/* eslint-disable react-hooks/static-components */
import * as React from "react"
import { type Metadata } from "next"
import { notFound } from "next/navigation"
import { siteConfig } from "@/lib/config"
import {
getDemoItem,
getRegistryComponent,
getRegistryItem,
} from "@/lib/registry"
import { absoluteUrl } from "@/lib/utils"
import { getStyle, legacyStyles, type Style } from "@/registry/_legacy-styles"
import "@/styles/legacy-themes.css"
import { ComponentPreview } from "./component-preview"
export const revalidate = false
export const dynamic = "force-static"
export const dynamicParams = false
const getCachedRegistryItem = React.cache(
async (name: string, styleName: Style["name"]) => {
// Try registry item first, then fallback to demo item (for examples).
const item = await getRegistryItem(name, styleName)
if (item) {
return item
}
return await getDemoItem(name, styleName)
}
)
export async function generateMetadata({
params,
}: {
params: Promise<{
style: string
name: string
}>
}): Promise<Metadata> {
const { style: styleName, name } = await params
const style = getStyle(styleName)
if (!style) {
return {}
}
const item = await getCachedRegistryItem(name, style.name)
if (!item) {
return {}
}
const title = item.name
const description = item.description
return {
title: item.name,
description,
// ... (129 more lines)
Domain
Subdomains
Dependencies
- ComponentPreview
- _legacy-styles
- component-preview.tsx
- config
- legacy-themes.css
- navigation
- next
- react
- registry
- utils
Source
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 4 function(s): BlockPage, generateMetadata, generateStaticParams, getCachedRegistryItem.
What does page.tsx depend on?
page.tsx imports 10 module(s): ComponentPreview, _legacy-styles, component-preview.tsx, config, legacy-themes.css, navigation, next, react, and 2 more.
Where is page.tsx in the architecture?
page.tsx is located at apps/v4/app/(view)/view/[style]/[name]/page.tsx (domain: DocumentationAtlas, subdomain: Changelog, directory: apps/v4/app/(view)/view/[style]/[name]).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free