Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { Link } from '@tanstack/react-router';
import { clsx } from 'clsx';

type Tab = {
label: string;
to: string;
};

const tabs: Tab[] = [
{ label: 'Projects', to: '/explore-public-knowledge/projects' },
{ label: 'dApps', to: '/explore-public-knowledge/dapps' },
{ label: 'Investment Rounts', to: '/explore-public-knowledge/investment-rounts' },
{ label: 'Asset Market', to: '/explore-public-knowledge/asset-market' },
];

export function ExploreTabs() {
return (
<div className="w-full flex justify-center">
<div className="inline-flex rounded-lg border bg-background p-1">
{tabs.map((tab) => (
<Link
key={tab.to}
to={tab.to}
activeOptions={{ exact: false }}
activeProps={{ className: 'bg-primary text-primary-foreground' }}
className={clsx(
'px-4 py-2 text-sm rounded-md transition-colors text-foreground hover:bg-accent hover:text-accent-foreground',
)}
>
{tab.label}
</Link>
))}
</div>
</div>
);
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Button } from '@/components/ui/button';
import {
NavigationMenu,
NavigationMenuContent,
NavigationMenuItem,
NavigationMenuLink,
NavigationMenuList,
NavigationMenuTrigger,
NavigationMenu,
NavigationMenuContent,
NavigationMenuItem,
NavigationMenuLink,
NavigationMenuList,
NavigationMenuTrigger,
} from '@/components/ui/navigation-menu';
import { TooltipProvider } from '@/components/ui/tooltip';
import { useHypergraphApp, useHypergraphAuth } from '@graphprotocol/hypergraph-react';
Expand Down Expand Up @@ -51,7 +51,7 @@ export function Navbar() {
</NavigationMenuItem>

<NavigationMenuItem>
<Link to="/explore-public-knowledge">
<Link to="/explore-public-knowledge/projects">
<NavigationMenuLink className="group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1">
Explore Public Knowledge
</NavigationMenuLink>
Expand Down
44 changes: 44 additions & 0 deletions apps/create-hypergraph/template-vite-react/src/mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,48 @@ export const mapping: Mapping.Mapping = {
avatar: Id('1155beff-fad5-49b7-a2e0-da4777b8792c'),
},
},
Dapp: {
typeIds: [Id('8ca136d0-698a-4bbf-a76b-8e2741b2dc8c')],
properties: {
name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
description: Id('9b1f76ff-9711-404c-861e-59dc3fa7d037'),
xUrl: Id('0d625978-4b3c-4b57-a86f-de45c997c73c'),
githubUrl: Id('9eedefa8-60ae-4ac1-9a04-805054a4b094'),
},
relations: {
avatar: Id('1155beff-fad5-49b7-a2e0-da4777b8792c'),
},
},
Investor: {
typeIds: [Id('331aea18-973c-4adc-8f53-614f598d262d')],
properties: {
name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
},
},
FundingStage: {
typeIds: [Id('8d35d217-3fa1-4686-b74f-fcb3e9438067')],
properties: {
name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
},
},
InvestmentRound: {
typeIds: [Id('8f03f4c9-59e4-44a8-a625-c0a40b1ff330')],
properties: {
name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
raisedAmount: Id('16781706-dd9c-48bf-913e-cdf18b56034f'),
},
relations: {
investors: Id('9b8a610a-fa35-486e-a479-e253dbdabb4f'),
fundingStages: Id('e278c3d4-78b9-4222-b272-5a39a8556bd2'),
raisedBy: Id('b4878d1a-0609-488d-b8a6-e19862d6b62f'),
},
},
Asset: {
typeIds: [Id('f8780a80-c238-4a2a-96cb-567d88b1aa63')],
properties: {
name: Id('a126ca53-0c8e-48d5-b888-82c734c38935'),
symbol: Id('ace1e96c-9b83-47b4-bd33-1d302ec0a0f5'),
blockchainAddress: Id('56b5944f-f059-48d1-b0fa-34abe84219da'),
},
},
};
134 changes: 128 additions & 6 deletions apps/create-hypergraph/template-vite-react/src/routeTree.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@ import { Route as LoginRouteImport } from './routes/login'
import { Route as ExplorePublicKnowledgeRouteImport } from './routes/explore-public-knowledge'
import { Route as AuthenticateSuccessRouteImport } from './routes/authenticate-success'
import { Route as IndexRouteImport } from './routes/index'
import { Route as ExplorePublicKnowledgeIndexRouteImport } from './routes/explore-public-knowledge/index'
import { Route as PublicSpaceSpaceIdRouteImport } from './routes/public-space/$space-id'
import { Route as PrivateSpaceSpaceIdRouteImport } from './routes/private-space/$space-id'
import { Route as ExplorePublicKnowledgeProjectsRouteImport } from './routes/explore-public-knowledge/projects'
import { Route as ExplorePublicKnowledgeInvestmentRountsRouteImport } from './routes/explore-public-knowledge/investment-rounts'
import { Route as ExplorePublicKnowledgeDappsRouteImport } from './routes/explore-public-knowledge/dapps'
import { Route as ExplorePublicKnowledgeAssetMarketRouteImport } from './routes/explore-public-knowledge/asset-market'

const LoginRoute = LoginRouteImport.update({
id: '/login',
Expand All @@ -36,6 +41,12 @@ const IndexRoute = IndexRouteImport.update({
path: '/',
getParentRoute: () => rootRouteImport,
} as any)
const ExplorePublicKnowledgeIndexRoute =
ExplorePublicKnowledgeIndexRouteImport.update({
id: '/',
path: '/',
getParentRoute: () => ExplorePublicKnowledgeRoute,
} as any)
const PublicSpaceSpaceIdRoute = PublicSpaceSpaceIdRouteImport.update({
id: '/public-space/$space-id',
path: '/public-space/$space-id',
Expand All @@ -46,31 +57,69 @@ const PrivateSpaceSpaceIdRoute = PrivateSpaceSpaceIdRouteImport.update({
path: '/private-space/$space-id',
getParentRoute: () => rootRouteImport,
} as any)
const ExplorePublicKnowledgeProjectsRoute =
ExplorePublicKnowledgeProjectsRouteImport.update({
id: '/projects',
path: '/projects',
getParentRoute: () => ExplorePublicKnowledgeRoute,
} as any)
const ExplorePublicKnowledgeInvestmentRountsRoute =
ExplorePublicKnowledgeInvestmentRountsRouteImport.update({
id: '/investment-rounts',
path: '/investment-rounts',
getParentRoute: () => ExplorePublicKnowledgeRoute,
} as any)
const ExplorePublicKnowledgeDappsRoute =
ExplorePublicKnowledgeDappsRouteImport.update({
id: '/dapps',
path: '/dapps',
getParentRoute: () => ExplorePublicKnowledgeRoute,
} as any)
const ExplorePublicKnowledgeAssetMarketRoute =
ExplorePublicKnowledgeAssetMarketRouteImport.update({
id: '/asset-market',
path: '/asset-market',
getParentRoute: () => ExplorePublicKnowledgeRoute,
} as any)

export interface FileRoutesByFullPath {
'/': typeof IndexRoute
'/authenticate-success': typeof AuthenticateSuccessRoute
'/explore-public-knowledge': typeof ExplorePublicKnowledgeRoute
'/explore-public-knowledge': typeof ExplorePublicKnowledgeRouteWithChildren
'/login': typeof LoginRoute
'/explore-public-knowledge/asset-market': typeof ExplorePublicKnowledgeAssetMarketRoute
'/explore-public-knowledge/dapps': typeof ExplorePublicKnowledgeDappsRoute
'/explore-public-knowledge/investment-rounts': typeof ExplorePublicKnowledgeInvestmentRountsRoute
'/explore-public-knowledge/projects': typeof ExplorePublicKnowledgeProjectsRoute
'/private-space/$space-id': typeof PrivateSpaceSpaceIdRoute
'/public-space/$space-id': typeof PublicSpaceSpaceIdRoute
'/explore-public-knowledge/': typeof ExplorePublicKnowledgeIndexRoute
}
export interface FileRoutesByTo {
'/': typeof IndexRoute
'/authenticate-success': typeof AuthenticateSuccessRoute
'/explore-public-knowledge': typeof ExplorePublicKnowledgeRoute
'/login': typeof LoginRoute
'/explore-public-knowledge/asset-market': typeof ExplorePublicKnowledgeAssetMarketRoute
'/explore-public-knowledge/dapps': typeof ExplorePublicKnowledgeDappsRoute
'/explore-public-knowledge/investment-rounts': typeof ExplorePublicKnowledgeInvestmentRountsRoute
'/explore-public-knowledge/projects': typeof ExplorePublicKnowledgeProjectsRoute
'/private-space/$space-id': typeof PrivateSpaceSpaceIdRoute
'/public-space/$space-id': typeof PublicSpaceSpaceIdRoute
'/explore-public-knowledge': typeof ExplorePublicKnowledgeIndexRoute
}
export interface FileRoutesById {
__root__: typeof rootRouteImport
'/': typeof IndexRoute
'/authenticate-success': typeof AuthenticateSuccessRoute
'/explore-public-knowledge': typeof ExplorePublicKnowledgeRoute
'/explore-public-knowledge': typeof ExplorePublicKnowledgeRouteWithChildren
'/login': typeof LoginRoute
'/explore-public-knowledge/asset-market': typeof ExplorePublicKnowledgeAssetMarketRoute
'/explore-public-knowledge/dapps': typeof ExplorePublicKnowledgeDappsRoute
'/explore-public-knowledge/investment-rounts': typeof ExplorePublicKnowledgeInvestmentRountsRoute
'/explore-public-knowledge/projects': typeof ExplorePublicKnowledgeProjectsRoute
'/private-space/$space-id': typeof PrivateSpaceSpaceIdRoute
'/public-space/$space-id': typeof PublicSpaceSpaceIdRoute
'/explore-public-knowledge/': typeof ExplorePublicKnowledgeIndexRoute
}
export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath
Expand All @@ -79,30 +128,44 @@ export interface FileRouteTypes {
| '/authenticate-success'
| '/explore-public-knowledge'
| '/login'
| '/explore-public-knowledge/asset-market'
| '/explore-public-knowledge/dapps'
| '/explore-public-knowledge/investment-rounts'
| '/explore-public-knowledge/projects'
| '/private-space/$space-id'
| '/public-space/$space-id'
| '/explore-public-knowledge/'
fileRoutesByTo: FileRoutesByTo
to:
| '/'
| '/authenticate-success'
| '/explore-public-knowledge'
| '/login'
| '/explore-public-knowledge/asset-market'
| '/explore-public-knowledge/dapps'
| '/explore-public-knowledge/investment-rounts'
| '/explore-public-knowledge/projects'
| '/private-space/$space-id'
| '/public-space/$space-id'
| '/explore-public-knowledge'
id:
| '__root__'
| '/'
| '/authenticate-success'
| '/explore-public-knowledge'
| '/login'
| '/explore-public-knowledge/asset-market'
| '/explore-public-knowledge/dapps'
| '/explore-public-knowledge/investment-rounts'
| '/explore-public-knowledge/projects'
| '/private-space/$space-id'
| '/public-space/$space-id'
| '/explore-public-knowledge/'
fileRoutesById: FileRoutesById
}
export interface RootRouteChildren {
IndexRoute: typeof IndexRoute
AuthenticateSuccessRoute: typeof AuthenticateSuccessRoute
ExplorePublicKnowledgeRoute: typeof ExplorePublicKnowledgeRoute
ExplorePublicKnowledgeRoute: typeof ExplorePublicKnowledgeRouteWithChildren
LoginRoute: typeof LoginRoute
PrivateSpaceSpaceIdRoute: typeof PrivateSpaceSpaceIdRoute
PublicSpaceSpaceIdRoute: typeof PublicSpaceSpaceIdRoute
Expand Down Expand Up @@ -138,6 +201,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof IndexRouteImport
parentRoute: typeof rootRouteImport
}
'/explore-public-knowledge/': {
id: '/explore-public-knowledge/'
path: '/'
fullPath: '/explore-public-knowledge/'
preLoaderRoute: typeof ExplorePublicKnowledgeIndexRouteImport
parentRoute: typeof ExplorePublicKnowledgeRoute
}
'/public-space/$space-id': {
id: '/public-space/$space-id'
path: '/public-space/$space-id'
Expand All @@ -152,13 +222,65 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof PrivateSpaceSpaceIdRouteImport
parentRoute: typeof rootRouteImport
}
'/explore-public-knowledge/projects': {
id: '/explore-public-knowledge/projects'
path: '/projects'
fullPath: '/explore-public-knowledge/projects'
preLoaderRoute: typeof ExplorePublicKnowledgeProjectsRouteImport
parentRoute: typeof ExplorePublicKnowledgeRoute
}
'/explore-public-knowledge/investment-rounts': {
id: '/explore-public-knowledge/investment-rounts'
path: '/investment-rounts'
fullPath: '/explore-public-knowledge/investment-rounts'
preLoaderRoute: typeof ExplorePublicKnowledgeInvestmentRountsRouteImport
parentRoute: typeof ExplorePublicKnowledgeRoute
}
'/explore-public-knowledge/dapps': {
id: '/explore-public-knowledge/dapps'
path: '/dapps'
fullPath: '/explore-public-knowledge/dapps'
preLoaderRoute: typeof ExplorePublicKnowledgeDappsRouteImport
parentRoute: typeof ExplorePublicKnowledgeRoute
}
'/explore-public-knowledge/asset-market': {
id: '/explore-public-knowledge/asset-market'
path: '/asset-market'
fullPath: '/explore-public-knowledge/asset-market'
preLoaderRoute: typeof ExplorePublicKnowledgeAssetMarketRouteImport
parentRoute: typeof ExplorePublicKnowledgeRoute
}
}
}

interface ExplorePublicKnowledgeRouteChildren {
ExplorePublicKnowledgeAssetMarketRoute: typeof ExplorePublicKnowledgeAssetMarketRoute
ExplorePublicKnowledgeDappsRoute: typeof ExplorePublicKnowledgeDappsRoute
ExplorePublicKnowledgeInvestmentRountsRoute: typeof ExplorePublicKnowledgeInvestmentRountsRoute
ExplorePublicKnowledgeProjectsRoute: typeof ExplorePublicKnowledgeProjectsRoute
ExplorePublicKnowledgeIndexRoute: typeof ExplorePublicKnowledgeIndexRoute
}

const ExplorePublicKnowledgeRouteChildren: ExplorePublicKnowledgeRouteChildren =
{
ExplorePublicKnowledgeAssetMarketRoute:
ExplorePublicKnowledgeAssetMarketRoute,
ExplorePublicKnowledgeDappsRoute: ExplorePublicKnowledgeDappsRoute,
ExplorePublicKnowledgeInvestmentRountsRoute:
ExplorePublicKnowledgeInvestmentRountsRoute,
ExplorePublicKnowledgeProjectsRoute: ExplorePublicKnowledgeProjectsRoute,
ExplorePublicKnowledgeIndexRoute: ExplorePublicKnowledgeIndexRoute,
}

const ExplorePublicKnowledgeRouteWithChildren =
ExplorePublicKnowledgeRoute._addFileChildren(
ExplorePublicKnowledgeRouteChildren,
)

const rootRouteChildren: RootRouteChildren = {
IndexRoute: IndexRoute,
AuthenticateSuccessRoute: AuthenticateSuccessRoute,
ExplorePublicKnowledgeRoute: ExplorePublicKnowledgeRoute,
ExplorePublicKnowledgeRoute: ExplorePublicKnowledgeRouteWithChildren,
LoginRoute: LoginRoute,
PrivateSpaceSpaceIdRoute: PrivateSpaceSpaceIdRoute,
PublicSpaceSpaceIdRoute: PublicSpaceSpaceIdRoute,
Expand Down
Loading
Loading