Skip to content

Commit f4811be

Browse files
Copilot0xrinegade
andcommitted
Fix Netlify build issues: add missing login dictionary entries, fix wallet context SSR errors, and resolve import paths
Co-authored-by: 0xrinegade <[email protected]>
1 parent 6f111a0 commit f4811be

File tree

15 files changed

+130
-89
lines changed

15 files changed

+130
-89
lines changed

website/apps/nextjs/src/app/[lang]/(auth)/login/page.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default async function LoginPage({
3535
>
3636
<>
3737
<Icons.ChevronLeft className="mr-2 h-4 w-4" />
38-
{dict.login.back}
38+
{dict?.login?.back || "Back"}
3939
</>
4040
</Link>
4141
<div className="mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[350px]">
@@ -48,19 +48,19 @@ export default async function LoginPage({
4848
alt=""
4949
/>
5050
<h1 className="text-2xl font-semibold tracking-tight">
51-
{dict.login.welcome_back}
51+
{dict?.login?.welcome_back || "Welcome back"}
5252
</h1>
5353
<p className="text-sm text-muted-foreground">
54-
{dict.login.signin_title}
54+
{dict?.login?.signin_title || "Connect your wallet to sign in"}
5555
</p>
5656
</div>
57-
<UserAuthForm lang={lang} dict={dict.login} />
57+
<UserAuthForm lang={lang} dict={dict?.login || {}} />
5858
{/* <p className="px-8 text-center text-sm text-muted-foreground">
5959
<Link
6060
href={`/${lang}/register`}
6161
className="hover:text-brand underline underline-offset-4"
6262
>
63-
{dict.login.singup_title}
63+
{dict?.login?.singup_title || "Don't have an account? Sign up"}
6464
</Link>
6565
</p> */}
6666
</div>

website/apps/nextjs/src/app/[lang]/(auth)/register/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default async function RegisterPage({
3030
"absolute right-4 top-4 md:right-8 md:top-8",
3131
)}
3232
>
33-
{dict.marketing.login}
33+
{dict?.marketing?.login || "Login"}
3434
</Link>
3535
<div className="hidden h-full bg-muted lg:block" />
3636
<div className="lg:p-8">
@@ -44,7 +44,7 @@ export default async function RegisterPage({
4444
Enter your email below to create your account
4545
</p>
4646
</div>
47-
<UserAuthForm lang={lang} dict={dict.login} disabled={true} />
47+
<UserAuthForm lang={lang} dict={dict?.login || {}} disabled={true} />
4848
<p className="px-8 text-center text-sm text-muted-foreground">
4949
By clicking continue, you agree to our{" "}
5050
<Link

website/apps/nextjs/src/app/[lang]/(dashboard)/dashboard/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
// import { SolanaWalletProvider } from '../../../../../../../../src/sdk/solana-integration';
2+
import { SolanaWalletProvider } from '../../../../lib/sdk/solana-provider';
33
import { WalletAdapterNetwork } from '@solana/wallet-adapter-base';
44

55
export default function DashboardLayout({

website/apps/nextjs/src/app/[lang]/(dashboard)/dashboard/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
"use client";
12
import React from 'react';
2-
// import { SolanaPayment } from '../../../../../../../../src/sdk/solana-integration';
3+
import { SolanaPayment } from '../../../../lib/sdk/solana-payment';
34

45
export default function DashboardPage() {
56
// Example recipient address (replace with your own)
Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,25 @@
11
import React from 'react';
2-
// import { SolanaWalletProvider } from '../../../../../../../src/sdk/solana-integration';
3-
import { WalletAdapterNetwork } from '@solana/wallet-adapter-base';
42

53
export default function SettingsPage() {
6-
// Replace with your WalletConnect project ID
7-
const projectId = process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID || 'YOUR_PROJECT_ID';
8-
94
return (
10-
<SolanaWalletProvider
11-
projectId={projectId}
12-
network={WalletAdapterNetwork.Mainnet}
13-
>
14-
<div className="space-y-6">
15-
<div>
16-
<h3 className="text-lg font-medium">Wallet Settings</h3>
17-
<p className="text-sm text-muted-foreground">
18-
Manage your wallet connection and payment settings
19-
</p>
20-
</div>
21-
<div className="border rounded-md p-4">
22-
<div className="space-y-4">
23-
<div>
24-
<h4 className="text-sm font-medium">Connected Wallet</h4>
25-
<p className="text-sm text-muted-foreground">
26-
Your currently connected Solana wallet
27-
</p>
28-
</div>
29-
{/* WalletConnect components will display connection status here */}
5+
<div className="space-y-6">
6+
<div>
7+
<h3 className="text-lg font-medium">Wallet Settings</h3>
8+
<p className="text-sm text-muted-foreground">
9+
Manage your wallet connection and payment settings
10+
</p>
11+
</div>
12+
<div className="border rounded-md p-4">
13+
<div className="space-y-4">
14+
<div>
15+
<h4 className="text-sm font-medium">Connected Wallet</h4>
16+
<p className="text-sm text-muted-foreground">
17+
Your currently connected Solana wallet
18+
</p>
3019
</div>
20+
{/* WalletConnect components will display connection status here */}
3121
</div>
3222
</div>
33-
</SolanaWalletProvider>
23+
</div>
3424
);
3525
}

website/apps/nextjs/src/app/[lang]/(docs)/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
// import { SolanaWalletProvider } from '../../../../../../src/sdk/solana-integration';
2+
import { SolanaWalletProvider } from '../../../lib/sdk/solana-provider';
33
import { WalletAdapterNetwork } from '@solana/wallet-adapter-base';
44

55
export default function DocsLayout({
Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,28 @@
11
import React from 'react';
2-
// import { SolanaWalletProvider } from '../../../../../../../../src/sdk/solana-integration';
3-
import { WalletAdapterNetwork } from '@solana/wallet-adapter-base';
42

53
export default function ClusterPage({
64
params,
75
}: {
86
params: { clusterId: string };
97
}) {
10-
// Replace with your WalletConnect project ID
11-
const projectId = process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID || 'YOUR_PROJECT_ID';
12-
138
return (
14-
<SolanaWalletProvider
15-
projectId={projectId}
16-
network={WalletAdapterNetwork.Mainnet}
17-
>
18-
<div className="space-y-6">
19-
<div>
20-
<h3 className="text-lg font-medium">Cluster: {params.clusterId}</h3>
21-
<p className="text-sm text-muted-foreground">
22-
Manage your cluster settings and payments
23-
</p>
24-
</div>
25-
<div className="border rounded-md p-4">
26-
<div className="space-y-4">
27-
<div>
28-
<h4 className="text-sm font-medium">Cluster Details</h4>
29-
<p className="text-sm text-muted-foreground">
30-
Cluster ID: {params.clusterId}
31-
</p>
32-
</div>
9+
<div className="space-y-6">
10+
<div>
11+
<h3 className="text-lg font-medium">Cluster: {params.clusterId}</h3>
12+
<p className="text-sm text-muted-foreground">
13+
Manage your cluster settings and payments
14+
</p>
15+
</div>
16+
<div className="border rounded-md p-4">
17+
<div className="space-y-4">
18+
<div>
19+
<h4 className="text-sm font-medium">Cluster Details</h4>
20+
<p className="text-sm text-muted-foreground">
21+
Cluster ID: {params.clusterId}
22+
</p>
3323
</div>
3424
</div>
3525
</div>
36-
</SolanaWalletProvider>
26+
</div>
3727
);
3828
}

website/apps/nextjs/src/app/[lang]/(editor)/editor/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
// import { SolanaWalletProvider } from '../../../../../../../src/sdk/solana-integration';
2+
import { SolanaWalletProvider } from '../../../../lib/sdk/solana-provider';
33
import { WalletAdapterNetwork } from '@solana/wallet-adapter-base';
44

55
export default function EditorLayout({

website/apps/nextjs/src/app/admin/(dashboard)/dashboard/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
// import { SolanaWalletProvider } from '../../../../../src/sdk/solana-integration';
2+
import { SolanaWalletProvider } from '../../../../lib/sdk/solana-provider';
33
import { WalletAdapterNetwork } from '@solana/wallet-adapter-base';
44

55
export default function AdminDashboardLayout({

website/apps/nextjs/src/app/admin/login/page.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,16 @@ import { buttonVariants } from "@saasfly/ui/button";
1010
import * as Icons from "@saasfly/ui/icons";
1111

1212
export default function LoginPage() {
13-
const { publicKey, connecting } = useWallet();
13+
// Use try-catch to handle missing wallet context gracefully
14+
let walletState = { publicKey: null, connecting: false };
15+
try {
16+
const { publicKey, connecting } = useWallet();
17+
walletState = { publicKey, connecting };
18+
} catch (error) {
19+
console.warn("Wallet context not available:", error);
20+
}
21+
22+
const { publicKey, connecting } = walletState;
1423
const [isLoading, setIsLoading] = React.useState<boolean>(false);
1524

1625
return (

0 commit comments

Comments
 (0)