diff --git a/.changeset/great-papayas-divide.md b/.changeset/great-papayas-divide.md new file mode 100644 index 00000000..9e7aef98 --- /dev/null +++ b/.changeset/great-papayas-divide.md @@ -0,0 +1,6 @@ +--- +"create-hypergraph": patch +--- + +add datasets (dapps, investment roundes, assets) to templates + \ No newline at end of file diff --git a/apps/create-hypergraph/template-nextjs/Components/Layout.tsx b/apps/create-hypergraph/template-nextjs/Components/Layout.tsx index 3a223f5a..21adf05c 100644 --- a/apps/create-hypergraph/template-nextjs/Components/Layout.tsx +++ b/apps/create-hypergraph/template-nextjs/Components/Layout.tsx @@ -23,7 +23,7 @@ export function Layout({ children }: Readonly<{ children: React.ReactNode }>) { const { redirectToConnect, logout } = useHypergraphApp(); useLayoutEffect(() => { - if (pathname.startsWith('/login') || pathname.startsWith('/authenticate-success') || pathname === '/' || pathname === '/explore-public-knowledge') { + if (pathname.startsWith('/login') || pathname.startsWith('/authenticate-success') || pathname === '/' || pathname === '/explore-public-knowledge' || pathname === '/explore-public-knowledge/projects' || pathname === '/explore-public-knowledge/dapps' || pathname === '/explore-public-knowledge/investors' || pathname === '/explore-public-knowledge/investment-rounds' || pathname === '/explore-public-knowledge/asset-market') { return; } diff --git a/apps/create-hypergraph/template-nextjs/Components/explore-tabs.tsx b/apps/create-hypergraph/template-nextjs/Components/explore-tabs.tsx new file mode 100644 index 00000000..f5105092 --- /dev/null +++ b/apps/create-hypergraph/template-nextjs/Components/explore-tabs.tsx @@ -0,0 +1,45 @@ +'use client'; + +import { clsx } from 'clsx'; +import Link from 'next/link'; +import { usePathname } from 'next/navigation'; + +type Tab = { + label: string; + href: string; +}; + +const tabs: Tab[] = [ + { label: 'Projects', href: '/explore-public-knowledge/projects' }, + { label: 'dApps', href: '/explore-public-knowledge/dapps' }, + { label: 'Investment Rounds', href: '/explore-public-knowledge/investment-rounds' }, + { label: 'Asset Market', href: '/explore-public-knowledge/asset-market' }, +]; + +export function ExploreTabs() { + const pathname = usePathname(); + + return ( +
{asset.id}
+ + {asset.symbol &&{asset.symbol}
} + + {asset.blockchainAddress && ( +{asset.blockchainAddress}
+ )} +There are currently no public assets available to explore.
+{dapp.id}
+ + {dapp.description &&{dapp.description}
} + + {dapp.xUrl && ( + + + View on X + + )} + + {dapp.githubUrl && ( + + + View on Github + + )} +There are currently no public dapps available to explore.
+{investmentRound.id}
+ + {investmentRound.raisedAmount && ( +USD {investmentRound.raisedAmount}
+ )} + + {investmentRound.fundingStages.length > 0 && ( ++ {investmentRound.fundingStages.map((fundingStage) => fundingStage.name).join(', ')} +
+ )} + + {investmentRound.investors.length > 0 && ( ++ {investmentRound.investors.map((investor) => investor.name).join(', ')} +
+ )} +There are currently no public investment rounds available to explore.
++ This page demonstrates how to query public data from a space. No authentication is required. +
+- This page demonstrates how to query public data from a space. No authentication is required. -
-{project.id}
+ + {project.description &&{project.description}
} + + {project.xUrl && ( + + + View on X + + )} +There are currently no public projects available to explore.
+{project.id}
- - {/* Project description */} - {project.description &&{project.description}
} - - {/* Project xUrl */} - {project.xUrl && ( - - - View on X - - )} -There are currently no public projects available to explore.
-{asset.id}
+ + {/* Asset symbol */} + {asset.symbol &&{asset.symbol}
} + + {/* Asset blockchain address */} + {asset.blockchainAddress && ( +{asset.blockchainAddress}
+ )} +There are currently no public assets available to explore.
+{dapp.id}
+ + {/* Dapp description */} + {dapp.description &&{dapp.description}
} + + {/* Dapp xUrl */} + {dapp.xUrl && ( + + + View on X + + )} + + {/* Dapp githubUrl */} + {dapp.githubUrl && ( + + + View on Github + + )} +There are currently no public dapps available to explore.
+{investmentRound.id}
+ + {/* Investment round raised amount */} + {investmentRound.raisedAmount && ( +USD {investmentRound.raisedAmount}
+ )} + + {/* Investment round funding stages */} + {investmentRound.fundingStages.length > 0 && ( ++ {investmentRound.fundingStages.map((fundingStage) => fundingStage.name).join(', ')} +
+ )} + + {/* Investment round investors */} + {investmentRound.investors.length > 0 && ( ++ {investmentRound.investors.map((investor) => investor.name).join(', ')} +
+ )} +There are currently no public investment rounds available to explore.
+Discover and explore the vast network of knowledge already available in the public Knowledge Graph.
- + diff --git a/apps/create-hypergraph/template-vite-react/src/schema.ts b/apps/create-hypergraph/template-vite-react/src/schema.ts index 4e869b87..aee4444f 100644 --- a/apps/create-hypergraph/template-vite-react/src/schema.ts +++ b/apps/create-hypergraph/template-vite-react/src/schema.ts @@ -15,3 +15,33 @@ export class Project extends Entity.Class