Skip to content

Commit 62a1631

Browse files
authored
improve wording & run prettier on templates (#459)
1 parent b2fbdbb commit 62a1631

File tree

19 files changed

+255
-254
lines changed

19 files changed

+255
-254
lines changed

apps/create-hypergraph/template-nextjs/Components/Layout.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,17 @@ export function Layout({ children }: Readonly<{ children: React.ReactNode }>) {
2323
const { redirectToConnect, logout } = useHypergraphApp();
2424

2525
useLayoutEffect(() => {
26-
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') {
26+
if (
27+
pathname.startsWith('/login') ||
28+
pathname.startsWith('/authenticate-success') ||
29+
pathname === '/' ||
30+
pathname === '/explore-public-knowledge' ||
31+
pathname === '/explore-public-knowledge/projects' ||
32+
pathname === '/explore-public-knowledge/dapps' ||
33+
pathname === '/explore-public-knowledge/investors' ||
34+
pathname === '/explore-public-knowledge/investment-rounds' ||
35+
pathname === '/explore-public-knowledge/assets'
36+
) {
2737
return;
2838
}
2939

apps/create-hypergraph/template-nextjs/Components/explore-tabs.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const tabs: Tab[] = [
1313
{ label: 'Projects', href: '/explore-public-knowledge/projects' },
1414
{ label: 'dApps', href: '/explore-public-knowledge/dapps' },
1515
{ label: 'Investment Rounds', href: '/explore-public-knowledge/investment-rounds' },
16-
{ label: 'Asset Market', href: '/explore-public-knowledge/asset-market' },
16+
{ label: 'Assets', href: '/explore-public-knowledge/assets' },
1717
];
1818

1919
export function ExploreTabs() {
@@ -41,5 +41,3 @@ export function ExploreTabs() {
4141
</div>
4242
);
4343
}
44-
45-

apps/create-hypergraph/template-nextjs/app/explore-public-knowledge/asset-market/page.tsx renamed to apps/create-hypergraph/template-nextjs/app/explore-public-knowledge/assets/page.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default function ExploreAssetMarketPage() {
1414
<>
1515
<div className="text-center mb-4">
1616
<h2 className="text-2xl font-bold mb-4 bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent">
17-
Asset Market
17+
Assets
1818
</h2>
1919
</div>
2020

@@ -55,7 +55,12 @@ export default function ExploreAssetMarketPage() {
5555
<div className="text-center py-16">
5656
<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">
5757
<svg className="w-12 h-12 text-blue-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
58-
<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" />
58+
<path
59+
strokeLinecap="round"
60+
strokeLinejoin="round"
61+
strokeWidth={2}
62+
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"
63+
/>
5964
</svg>
6065
</div>
6166
<h3 className="text-xl font-semibold text-gray-900 mb-2">No Assets Found</h3>
@@ -65,5 +70,3 @@ export default function ExploreAssetMarketPage() {
6570
</>
6671
);
6772
}
68-
69-

apps/create-hypergraph/template-nextjs/app/explore-public-knowledge/dapps/page.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ export default function ExploreDappsPage() {
3333
<div className="relative p-6">
3434
<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">
3535
{dapp.avatar?.[0]?.url ? (
36-
<GraphImage src={dapp.avatar[0].url} alt={`${dapp.name} avatar`} className="w-full h-full object-cover" />
36+
<GraphImage
37+
src={dapp.avatar[0].url}
38+
alt={`${dapp.name} avatar`}
39+
className="w-full h-full object-cover"
40+
/>
3741
) : (
3842
<span className="text-white font-bold text-lg">{dapp.name.charAt(0).toUpperCase()}</span>
3943
)}
@@ -85,7 +89,12 @@ export default function ExploreDappsPage() {
8589
<div className="text-center py-16">
8690
<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">
8791
<svg className="w-12 h-12 text-blue-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
88-
<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" />
92+
<path
93+
strokeLinecap="round"
94+
strokeLinejoin="round"
95+
strokeWidth={2}
96+
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"
97+
/>
8998
</svg>
9099
</div>
91100
<h3 className="text-xl font-semibold text-gray-900 mb-2">No Dapps Found</h3>
@@ -95,5 +104,3 @@ export default function ExploreDappsPage() {
95104
</>
96105
);
97106
}
98-
99-

apps/create-hypergraph/template-nextjs/app/explore-public-knowledge/investment-rounds/page.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,12 @@ export default function ExploreInvestmentRoundsPage() {
7070
<div className="text-center py-16">
7171
<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">
7272
<svg className="w-12 h-12 text-blue-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
73-
<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" />
73+
<path
74+
strokeLinecap="round"
75+
strokeLinejoin="round"
76+
strokeWidth={2}
77+
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"
78+
/>
7479
</svg>
7580
</div>
7681
<h3 className="text-xl font-semibold text-gray-900 mb-2">No Investment Rounds Found</h3>
@@ -80,5 +85,3 @@ export default function ExploreInvestmentRoundsPage() {
8085
</>
8186
);
8287
}
83-
84-

apps/create-hypergraph/template-nextjs/app/explore-public-knowledge/layout.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import { ExploreTabs } from '../../Components/explore-tabs';
22

3-
export default function ExplorePublicKnowledgeLayout({
4-
children,
5-
}: {
6-
children: React.ReactNode;
7-
}) {
3+
export default function ExplorePublicKnowledgeLayout({ children }: { children: React.ReactNode }) {
84
return (
95
<div className="container mx-auto px-4 py-8">
106
<div className="text-center mb-12">
@@ -22,5 +18,3 @@ export default function ExplorePublicKnowledgeLayout({
2218
</div>
2319
);
2420
}
25-
26-

apps/create-hypergraph/template-nextjs/app/explore-public-knowledge/projects/page.tsx

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@ export default function ExploreProjectsPage() {
3232
<div className="relative">
3333
<div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
3434
<svg className="h-5 w-5 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
35-
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
35+
<path
36+
strokeLinecap="round"
37+
strokeLinejoin="round"
38+
strokeWidth={2}
39+
d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
40+
/>
3641
</svg>
3742
</div>
3843
<input
@@ -58,7 +63,11 @@ export default function ExploreProjectsPage() {
5863
<div className="relative p-6">
5964
<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">
6065
{project.avatar?.[0]?.url ? (
61-
<GraphImage src={project.avatar[0].url} alt={`${project.name} avatar`} className="w-full h-full object-cover" />
66+
<GraphImage
67+
src={project.avatar[0].url}
68+
alt={`${project.name} avatar`}
69+
className="w-full h-full object-cover"
70+
/>
6271
) : (
6372
<span className="text-white font-bold text-lg">{project.name.charAt(0).toUpperCase()}</span>
6473
)}
@@ -96,7 +105,12 @@ export default function ExploreProjectsPage() {
96105
<div className="text-center py-16">
97106
<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">
98107
<svg className="w-12 h-12 text-blue-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
99-
<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" />
108+
<path
109+
strokeLinecap="round"
110+
strokeLinejoin="round"
111+
strokeWidth={2}
112+
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"
113+
/>
100114
</svg>
101115
</div>
102116
<h3 className="text-xl font-semibold text-gray-900 mb-2">No Projects Found</h3>
@@ -106,5 +120,3 @@ export default function ExploreProjectsPage() {
106120
</>
107121
);
108122
}
109-
110-
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"singleQuote": true,
33
"printWidth": 120
4-
}
4+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Hypergraph + Vite + React
22

3-
This template is a minimal setup for a [Hypergraph](https://github.com/graphprotocol/hypergraph) app using Vite and React.
3+
This template is a minimal setup for a [Hypergraph](https://github.com/graphprotocol/hypergraph) app using Vite and React.
Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import js from '@eslint/js'
2-
import globals from 'globals'
3-
import reactHooks from 'eslint-plugin-react-hooks'
4-
import reactRefresh from 'eslint-plugin-react-refresh'
5-
import tseslint from 'typescript-eslint'
1+
import js from '@eslint/js';
2+
import globals from 'globals';
3+
import reactHooks from 'eslint-plugin-react-hooks';
4+
import reactRefresh from 'eslint-plugin-react-refresh';
5+
import tseslint from 'typescript-eslint';
66

77
export default tseslint.config(
88
{ ignores: ['dist'] },
@@ -19,10 +19,7 @@ export default tseslint.config(
1919
},
2020
rules: {
2121
...reactHooks.configs.recommended.rules,
22-
'react-refresh/only-export-components': [
23-
'warn',
24-
{ allowConstantExport: true },
25-
],
22+
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
2623
},
2724
},
28-
)
25+
);

0 commit comments

Comments
 (0)