1+ import { Button } from "@/components/ui/button" ;
2+ import { ToolTipLabel } from "@/components/ui/tooltip" ;
3+ import {
4+ ArrowUpDownIcon ,
5+ CircleDotDashedIcon ,
6+ PlusIcon ,
7+ ZapIcon ,
8+ } from "lucide-react" ;
9+ import Link from "next/link" ;
110import { redirect } from "next/navigation" ;
211import { getAuthTokenWalletAddress } from "../../../../api/lib/getAuthToken" ;
3- import { BlueprintsPage } from "./components/BlueprintsPage " ;
12+ import type { OfficialBlueprintSlug } from "./[blueprint_slug]/validBlueprintSlugs " ;
413
514export default async function Page ( props : {
615 params : Promise < { team_slug : string ; project_slug : string } > ;
716} ) {
17+ const params = await props . params ;
818 const accountAddress = await getAuthTokenWalletAddress ( ) ;
919
1020 if ( ! accountAddress ) {
@@ -14,5 +24,104 @@ export default async function Page(props: {
1424 ) ;
1525 }
1626
17- return < BlueprintsPage /> ;
27+ return (
28+ < div className = "flex grow flex-col" >
29+ < div className = "border-border border-b py-10" >
30+ < div className = "container flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between" >
31+ < h1 className = "font-semibold text-2xl tracking-tight sm:text-3xl" >
32+ Insight
33+ </ h1 >
34+ < ToolTipLabel label = "Coming Soon" >
35+ < Button className = "gap-2" disabled >
36+ < PlusIcon className = "size-4" />
37+ Add Blueprint < span className = "lg:hidden" > (Coming Soon) </ span >
38+ </ Button >
39+ </ ToolTipLabel >
40+ </ div >
41+ </ div >
42+ < div className = "container py-8" >
43+ < div className = "grid grid-cols-1 gap-5 md:grid-cols-2 lg:grid-cols-3" >
44+ { blueprints . map ( ( blueprint ) => {
45+ return (
46+ < BlueprintCard
47+ key = { blueprint . id }
48+ blueprint = { blueprint }
49+ teamSlug = { params . team_slug }
50+ projectSlug = { params . project_slug }
51+ icon = { blueprint . icon }
52+ />
53+ ) ;
54+ } ) }
55+ </ div >
56+ </ div >
57+ </ div >
58+ ) ;
59+ }
60+
61+ type Blueprint = {
62+ id : string ;
63+ name : string ;
64+ slug : OfficialBlueprintSlug ;
65+ description : string ;
66+ icon : React . FC < { className ?: string } > ;
67+ } ;
68+
69+ const blueprints : Blueprint [ ] = [
70+ {
71+ id : "1" ,
72+ name : "Transactions" ,
73+ slug : "transactions" ,
74+ description : "Query transaction data" ,
75+ icon : ArrowUpDownIcon ,
76+ } ,
77+ {
78+ id : "2" ,
79+ name : "Events" ,
80+ slug : "events" ,
81+ description : "Query event data" ,
82+ icon : ZapIcon ,
83+ } ,
84+ {
85+ id : "3" ,
86+ name : "Tokens" ,
87+ slug : "erc20-tokens" ,
88+ description : "Query ERC-20, ERC-721, and ERC-1155 tokens" ,
89+ icon : CircleDotDashedIcon ,
90+ } ,
91+ ] ;
92+
93+ function BlueprintCard ( props : {
94+ blueprint : Blueprint ;
95+ teamSlug : string ;
96+ projectSlug : string ;
97+ icon : React . FC < { className ?: string } > ;
98+ } ) {
99+ const { blueprint } = props ;
100+ return (
101+ < div
102+ key = { blueprint . id }
103+ className = "relative rounded-lg border border-border bg-muted/50 p-4 hover:bg-muted/70"
104+ >
105+ < div className = "flex items-center gap-4" >
106+ < div className = "rounded-xl border p-1" >
107+ < div className = "rounded-lg border bg-muted p-1.5" >
108+ < props . icon className = "size-5 text-muted-foreground" />
109+ </ div >
110+ </ div >
111+
112+ < div >
113+ < Link
114+ className = "group static before:absolute before:top-0 before:right-0 before:bottom-0 before:left-0 before:z-0"
115+ href = { `/team/${ props . teamSlug } /${ props . projectSlug } /insight/${ blueprint . slug } ` }
116+ >
117+ < h2 className = "font-semibold text-lg" > { blueprint . name } </ h2 >
118+ </ Link >
119+
120+ < p className = "text-muted-foreground text-sm" >
121+ { blueprint . description }
122+ </ p >
123+ </ div >
124+ </ div >
125+ </ div >
126+ ) ;
18127}
0 commit comments