diff --git a/apps/dashboard/src/app/team/[team_slug]/[project_slug]/insight/components/BlueprintsExplorer.tsx b/apps/dashboard/src/app/team/[team_slug]/[project_slug]/insight/components/BlueprintsExplorer.tsx new file mode 100644 index 00000000000..1c4ff6582ef --- /dev/null +++ b/apps/dashboard/src/app/team/[team_slug]/[project_slug]/insight/components/BlueprintsExplorer.tsx @@ -0,0 +1,64 @@ +"use client"; + +import {} from "@/components/ui/dropdown-menu"; +import {} from "@/components/ui/select"; +import { Layers3 } from "lucide-react"; +import Link from "next/link"; + +export type Blueprint = { + id: string; + name: string; + slug: string; + description: string; +}; + +export function BlueprintsExplorer(props: { + blueprints: Blueprint[]; +}) { + const { blueprints } = props; + return ( +
+ {/* Blueprints */} + {blueprints.length === 0 ? ( +
+ No blueprints found +
+ ) : ( +
+ {blueprints.map((blueprint) => { + return ; + })} +
+ )} + +
+
+ ); +} + +function BlueprintCard(props: { + blueprint: Blueprint; +}) { + const { blueprint } = props; + return ( +
+ + +
+ +

{blueprint.name}

+ + +

+ {blueprint.description} +

+
+
+ ); +} diff --git a/apps/dashboard/src/app/team/[team_slug]/[project_slug]/insight/components/BlueprintsPage.tsx b/apps/dashboard/src/app/team/[team_slug]/[project_slug]/insight/components/BlueprintsPage.tsx new file mode 100644 index 00000000000..d20105c7738 --- /dev/null +++ b/apps/dashboard/src/app/team/[team_slug]/[project_slug]/insight/components/BlueprintsPage.tsx @@ -0,0 +1,41 @@ +import { type Blueprint, BlueprintsExplorer } from "./BlueprintsExplorer"; +import { BlueprintsPageHeader } from "./BlueprintsPageHeader"; + +export function BlueprintsPage() { + return ( +
+ +
+ +
+ ); +} + +function getProjectBlueprints() { + return [ + { + id: "1", + name: "Transactions", + slug: "transactions-blueprint", + description: "Query transaction data", + }, + { + id: "2", + name: "Events", + slug: "events-blueprint", + description: "Query event data", + }, + { + id: "3", + name: "Tokens", + slug: "tokens-blueprint", + description: "Query ERC-20, ERC-721, and ERC-1155 tokens", + }, + ] as Blueprint[]; +} + +function BlueprintsPageContent() { + const blueprints = getProjectBlueprints(); + + return ; +} diff --git a/apps/dashboard/src/app/team/[team_slug]/[project_slug]/insight/components/BlueprintsPageHeader.tsx b/apps/dashboard/src/app/team/[team_slug]/[project_slug]/insight/components/BlueprintsPageHeader.tsx new file mode 100644 index 00000000000..ab68babe21b --- /dev/null +++ b/apps/dashboard/src/app/team/[team_slug]/[project_slug]/insight/components/BlueprintsPageHeader.tsx @@ -0,0 +1,25 @@ +"use client"; + +import { Button } from "@/components/ui/button"; +import { PlusIcon } from "lucide-react"; + +export function BlueprintsPageHeader() { + return ( +
+
+
+

+ Insight +

+ +
+
+
+ ); +} diff --git a/apps/dashboard/src/app/team/[team_slug]/[project_slug]/insight/page.tsx b/apps/dashboard/src/app/team/[team_slug]/[project_slug]/insight/page.tsx new file mode 100644 index 00000000000..4722c8cfab8 --- /dev/null +++ b/apps/dashboard/src/app/team/[team_slug]/[project_slug]/insight/page.tsx @@ -0,0 +1,18 @@ +import { redirect } from "next/navigation"; +import { getAuthTokenWalletAddress } from "../../../../api/lib/getAuthToken"; +import { BlueprintsPage } from "./components/BlueprintsPage"; + +export default async function Page(props: { + params: Promise<{ team_slug: string; project_slug: string }>; +}) { + const accountAddress = await getAuthTokenWalletAddress(); + + if (!accountAddress) { + const { team_slug, project_slug } = await props.params; + return redirect( + `/login?next=${encodeURIComponent(`/team/${team_slug}/${project_slug}/insight`)}`, + ); + } + + return ; +} diff --git a/apps/dashboard/src/app/team/[team_slug]/[project_slug]/layout.tsx b/apps/dashboard/src/app/team/[team_slug]/[project_slug]/layout.tsx index f7a25c64eb2..0b8994efc49 100644 --- a/apps/dashboard/src/app/team/[team_slug]/[project_slug]/layout.tsx +++ b/apps/dashboard/src/app/team/[team_slug]/[project_slug]/layout.tsx @@ -69,6 +69,10 @@ export default async function TeamLayout(props: { }, ] : []), + { + path: `/team/${params.team_slug}/${params.project_slug}/insight`, + name: "Insight", + }, { path: `/team/${params.team_slug}/${params.project_slug}/settings`, name: "Settings",