Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
12 changes: 11 additions & 1 deletion apps/create-hypergraph/template-nextjs/Components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,17 @@ 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' || 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') {
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/assets'
) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ 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' },
{ label: 'Assets', href: '/explore-public-knowledge/assets' },
];

export function ExploreTabs() {
Expand Down Expand Up @@ -41,5 +41,3 @@ export function ExploreTabs() {
</div>
);
}


Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function ExploreAssetMarketPage() {
<>
<div className="text-center mb-4">
<h2 className="text-2xl font-bold mb-4 bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent">
Asset Market
Assets
</h2>
</div>

Expand Down Expand Up @@ -55,7 +55,12 @@ export default function ExploreAssetMarketPage() {
<div className="text-center py-16">
<div className="w-24 h-24 bg-gradient-to-br from-blue-100 to-purple-100 rounded-full flex items-center justify-center mx-auto mb-6">
<svg className="w-12 h-12 text-blue-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" />
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"
/>
</svg>
</div>
<h3 className="text-xl font-semibold text-gray-900 mb-2">No Assets Found</h3>
Expand All @@ -65,5 +70,3 @@ export default function ExploreAssetMarketPage() {
</>
);
}


Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ export default function ExploreDappsPage() {
<div className="relative p-6">
<div className="w-12 h-12 bg-gradient-to-br from-blue-500 to-purple-600 rounded-xl flex items-center justify-center mb-4 group-hover:scale-110 transition-transform duration-300 overflow-hidden">
{dapp.avatar?.[0]?.url ? (
<GraphImage src={dapp.avatar[0].url} alt={`${dapp.name} avatar`} className="w-full h-full object-cover" />
<GraphImage
src={dapp.avatar[0].url}
alt={`${dapp.name} avatar`}
className="w-full h-full object-cover"
/>
) : (
<span className="text-white font-bold text-lg">{dapp.name.charAt(0).toUpperCase()}</span>
)}
Expand Down Expand Up @@ -85,7 +89,12 @@ export default function ExploreDappsPage() {
<div className="text-center py-16">
<div className="w-24 h-24 bg-gradient-to-br from-blue-100 to-purple-100 rounded-full flex items-center justify-center mx-auto mb-6">
<svg className="w-12 h-12 text-blue-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" />
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"
/>
</svg>
</div>
<h3 className="text-xl font-semibold text-gray-900 mb-2">No Dapps Found</h3>
Expand All @@ -95,5 +104,3 @@ export default function ExploreDappsPage() {
</>
);
}


Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@ export default function ExploreInvestmentRoundsPage() {
<div className="text-center py-16">
<div className="w-24 h-24 bg-gradient-to-br from-blue-100 to-purple-100 rounded-full flex items-center justify-center mx-auto mb-6">
<svg className="w-12 h-12 text-blue-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" />
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"
/>
</svg>
</div>
<h3 className="text-xl font-semibold text-gray-900 mb-2">No Investment Rounds Found</h3>
Expand All @@ -80,5 +85,3 @@ export default function ExploreInvestmentRoundsPage() {
</>
);
}


Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { ExploreTabs } from '../../Components/explore-tabs';

export default function ExplorePublicKnowledgeLayout({
children,
}: {
children: React.ReactNode;
}) {
export default function ExplorePublicKnowledgeLayout({ children }: { children: React.ReactNode }) {
return (
<div className="container mx-auto px-4 py-8">
<div className="text-center mb-12">
Expand All @@ -22,5 +18,3 @@ export default function ExplorePublicKnowledgeLayout({
</div>
);
}


Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ export default function ExploreProjectsPage() {
<div className="relative">
<div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<svg className="h-5 w-5 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
/>
</svg>
</div>
<input
Expand All @@ -58,7 +63,11 @@ export default function ExploreProjectsPage() {
<div className="relative p-6">
<div className="w-12 h-12 bg-gradient-to-br from-blue-500 to-purple-600 rounded-xl flex items-center justify-center mb-4 group-hover:scale-110 transition-transform duration-300 overflow-hidden">
{project.avatar?.[0]?.url ? (
<GraphImage src={project.avatar[0].url} alt={`${project.name} avatar`} className="w-full h-full object-cover" />
<GraphImage
src={project.avatar[0].url}
alt={`${project.name} avatar`}
className="w-full h-full object-cover"
/>
) : (
<span className="text-white font-bold text-lg">{project.name.charAt(0).toUpperCase()}</span>
)}
Expand Down Expand Up @@ -96,7 +105,12 @@ export default function ExploreProjectsPage() {
<div className="text-center py-16">
<div className="w-24 h-24 bg-gradient-to-br from-blue-100 to-purple-100 rounded-full flex items-center justify-center mx-auto mb-6">
<svg className="w-12 h-12 text-blue-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" />
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"
/>
</svg>
</div>
<h3 className="text-xl font-semibold text-gray-900 mb-2">No Projects Found</h3>
Expand All @@ -106,5 +120,3 @@ export default function ExploreProjectsPage() {
</>
);
}


2 changes: 1 addition & 1 deletion apps/create-hypergraph/template-vite-react/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"singleQuote": true,
"printWidth": 120
}
}
2 changes: 1 addition & 1 deletion apps/create-hypergraph/template-vite-react/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Hypergraph + Vite + React

This template is a minimal setup for a [Hypergraph](https://github.com/graphprotocol/hypergraph) app using Vite and React.
This template is a minimal setup for a [Hypergraph](https://github.com/graphprotocol/hypergraph) app using Vite and React.
17 changes: 7 additions & 10 deletions apps/create-hypergraph/template-vite-react/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'
import js from '@eslint/js';
import globals from 'globals';
import reactHooks from 'eslint-plugin-react-hooks';
import reactRefresh from 'eslint-plugin-react-refresh';
import tseslint from 'typescript-eslint';

export default tseslint.config(
{ ignores: ['dist'] },
Expand All @@ -19,10 +19,7 @@ export default tseslint.config(
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
},
},
)
);
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const tabs: Tab[] = [
{ label: 'Projects', to: '/explore-public-knowledge/projects' },
{ label: 'dApps', to: '/explore-public-knowledge/dapps' },
{ label: 'Investment Rounds', to: '/explore-public-knowledge/investment-rounds' },
{ label: 'Asset Market', to: '/explore-public-knowledge/asset-market' },
{ label: 'Assets', to: '/explore-public-knowledge/assets' },
];

export function ExploreTabs() {
Expand Down
4 changes: 2 additions & 2 deletions apps/create-hypergraph/template-vite-react/src/index.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import 'tailwindcss';
@import "tw-animate-css";
@import 'tw-animate-css';

@custom-variant dark (&:is(.dark *));

Expand Down Expand Up @@ -117,4 +117,4 @@
body {
@apply bg-background text-foreground;
}
}
}
2 changes: 1 addition & 1 deletion apps/create-hypergraph/template-vite-react/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ if (rootElement && !rootElement.innerHTML) {
</HypergraphAppProvider>,
// </React.StrictMode>,
);
}
}
Loading
Loading