Skip to content

Commit 394bf8f

Browse files
Copilot0xrinegade
andcommitted
Fix Netlify build errors
Co-authored-by: 0xrinegade <[email protected]>
1 parent 4130cf6 commit 394bf8f

File tree

8 files changed

+162
-12
lines changed

8 files changed

+162
-12
lines changed

frontend/app/tokenomics/page.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import { Coins, Users, Shield, Zap, TrendingUp, Lock, Gift, Vote, ExternalLink, Copy } from 'lucide-react';
1+
import { Coins, Users, Shield, Zap, TrendingUp, Lock, Gift, Vote, ExternalLink } from 'lucide-react';
22
import { SVMAI_TOKEN_MINT, EXTERNAL_LINKS } from '@/lib/constants';
3+
import CopyButton from '@/components/common/CopyButton';
34

45
export default function TokenomicsPage() {
56
return (
@@ -36,13 +37,7 @@ export default function TokenomicsPage() {
3637
<code className="text-xs bg-gray-100 dark:bg-gray-700 px-2 py-1 rounded font-mono">
3738
{SVMAI_TOKEN_MINT.toString()}
3839
</code>
39-
<button
40-
onClick={() => navigator.clipboard.writeText(SVMAI_TOKEN_MINT.toString())}
41-
className="text-gray-400 hover:text-[#14F195] transition-colors"
42-
title="Copy address"
43-
>
44-
<Copy size={16} />
45-
</button>
40+
<CopyButton textToCopy={SVMAI_TOKEN_MINT.toString()} />
4641
</div>
4742
<div className="flex space-x-2">
4843
<a
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
"use client";
2+
3+
import { Copy } from 'lucide-react';
4+
5+
interface CopyButtonProps {
6+
textToCopy: string;
7+
className?: string;
8+
}
9+
10+
export default function CopyButton({ textToCopy, className }: CopyButtonProps) {
11+
const handleCopy = () => {
12+
navigator.clipboard.writeText(textToCopy);
13+
};
14+
15+
return (
16+
<button
17+
onClick={handleCopy}
18+
className={className || "text-gray-400 hover:text-[#14F195] transition-colors"}
19+
title="Copy address"
20+
>
21+
<Copy size={16} />
22+
</button>
23+
);
24+
}

frontend/lib/constants.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ export const MCP_SERVER_REGISTRY_PROGRAM_ID = new PublicKey(
1313
process.env.NEXT_PUBLIC_MCP_PROGRAM_ID || '11111111111111111111111111111111'
1414
);
1515

16+
// PDA Seeds for program accounts
17+
export const AGENT_REGISTRY_PDA_SEED = 'agent';
18+
export const MCP_SERVER_REGISTRY_PDA_SEED = 'mcp-server';
19+
1620
// $SVMAI Token Configuration
1721
export const SVMAI_TOKEN_MINT = new PublicKey('Cpzvdx6pppc9TNArsGsqgShCsKC9NCCjA2gtzHvUpump');
1822
export const SVMAI_TOKEN_DECIMALS = 6; // Standard SPL token decimals

frontend/lib/solana/connection.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { Connection, ConnectionConfig } from '@solana/web3.js';
2-
import { DEFAULT_RPC } from '@/lib/constants';
2+
import { RPC_ENDPOINT } from '@/lib/constants';
33

44
const config: ConnectionConfig = {
55
commitment: 'confirmed',
66
confirmTransactionInitialTimeout: 60000,
77
};
88

9-
export const connection = new Connection(DEFAULT_RPC, config);
9+
export const connection = new Connection(RPC_ENDPOINT, config);
1010

1111
export const getConnection = (endpoint?: string) => {
1212
if (endpoint) {

frontend/next.config.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import withPWA from 'next-pwa';
33
/** @type {import('next').NextConfig} */
44
const nextConfig = {
55
reactStrictMode: true,
6-
swcMinify: true,
76
images: {
87
domains: ['localhost'],
98
},

frontend/package-lock.json

Lines changed: 127 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"@types/node": "^20",
3535
"@types/react": "^19",
3636
"@types/react-dom": "^19",
37+
"pino-pretty": "^13.0.0",
3738
"tailwindcss": "^4",
3839
"typescript": "^5"
3940
}

frontend/public/sw.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)