Skip to content

Commit 2e9a26d

Browse files
committed
oook
1 parent 42399f1 commit 2e9a26d

8 files changed

Lines changed: 152 additions & 27 deletions

File tree

.gitignore

Lines changed: 139 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,140 @@
1-
node_modules
1+
# Dependencies
2+
node_modules/
3+
npm-debug.log*
4+
yarn-debug.log*
5+
yarn-error.log*
6+
pnpm-debug.log*
7+
lerna-debug.log*
8+
9+
# Build outputs
10+
.next/
11+
out/
12+
build/
13+
dist/
14+
15+
# Environment variables
16+
.env
17+
.env.local
18+
.env.development.local
19+
.env.test.local
20+
.env.production.local
21+
22+
# Cache directories
23+
.cache/
24+
.parcel-cache/
25+
.turbo/
26+
.vite/
27+
.eslintcache
28+
29+
# Testing
30+
coverage/
31+
.nyc_output/
32+
33+
# Logs
34+
logs/
35+
*.log
36+
37+
# Runtime data
38+
pids/
39+
*.pid
40+
*.seed
41+
*.pid.lock
42+
43+
# Optional npm cache directory
44+
.npm
45+
46+
# Optional eslint cache
47+
.eslintcache
48+
49+
# Microbundle cache
50+
.rpt2_cache/
51+
.rts2_cache_cjs/
52+
.rts2_cache_es/
53+
.rts2_cache_umd/
54+
55+
# Optional REPL history
56+
.node_repl_history
57+
58+
# Output of 'npm pack'
59+
*.tgz
60+
61+
# Yarn Integrity file
62+
.yarn-integrity
63+
64+
# parcel-bundler cache (https://parceljs.org/)
65+
.cache
66+
.parcel-cache
67+
68+
# Next.js build output
69+
.next/
70+
out/
71+
72+
# Nuxt.js build / generate output
73+
.nuxt
74+
dist
75+
76+
# Gatsby files
77+
.cache/
78+
public
79+
80+
# Storybook build outputs
81+
.out
82+
.storybook-out
83+
storybook-static
84+
85+
# Temporary folders
86+
tmp/
87+
temp/
88+
89+
# Editor directories and files
90+
.vscode/
91+
!.vscode/extensions.json
92+
.idea/
93+
*.swp
94+
*.swo
95+
*~
96+
97+
# OS generated files
98+
.DS_Store
99+
.DS_Store?
100+
._*
101+
.Spotlight-V100
102+
.Trashes
103+
ehthumbs.db
104+
Thumbs.db
105+
106+
# Vercel
2107
.vercel
108+
109+
# Turbo
110+
.turbo
111+
112+
# Sentry
113+
.sentryclirc
114+
115+
# Local development
116+
.local
117+
118+
# TypeScript
119+
*.tsbuildinfo
120+
121+
# ESLint
122+
.eslintcache
123+
124+
# Jest
125+
coverage/
126+
127+
# Snyk
128+
.snyk
129+
130+
# Husky
131+
.husky/_
132+
133+
# Playwright
134+
test-results/
135+
playwright-report/
136+
playwright/.cache/
137+
138+
# Vite
139+
vite.config.js.timestamp-*
140+
vite.config.ts.timestamp-*

next-env.d.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3-
/// <reference types="next/navigation-types/compat/navigation" />
43

54
// NOTE: This file should not be edited
6-
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
5+
// see https://nextjs.org/docs/basic-features/typescript for more information.

next.config.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/** @type {import('next').NextConfig} */
2-
import path from 'path';
32

43
const nextConfig = {
54
reactStrictMode: true,
@@ -12,11 +11,6 @@ const nextConfig = {
1211
// Optimize for Vercel deployment
1312
output: 'standalone', // Creates a standalone build that's optimized for Vercel
1413

15-
experimental: {
16-
// Enable modern features
17-
optimizeCss: true, // For CSS optimization
18-
},
19-
2014
// Disable unnecessary source maps in production
2115
productionBrowserSourceMaps: false,
2216

@@ -27,13 +21,7 @@ const nextConfig = {
2721
images: {
2822
unoptimized: process.env.NODE_ENV === 'development',
2923
},
30-
31-
// Force alias resolution for Vercel build
32-
webpack: (config) => {
33-
config.resolve.alias['@'] = path.resolve(__dirname, 'src');
34-
return config;
35-
},
3624
};
3725

38-
// Exporting the configuration without Sentry for now
26+
// Exporting the configuration
3927
export default nextConfig;

src/app/api/auth/nextauth/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import NextAuth from 'next-auth/next';
1+
import NextAuth from 'next-auth';
22
import { authOptions } from '@/lib/auth-options';
33

44
const handler = NextAuth(authOptions);

src/app/dashboard/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export default function DashboardPage() {
179179
{isLoading ? (
180180
<p>Loading...</p>
181181
) : content.length === 0 ? (
182-
<p>You don't have any IPFS content yet.</p>
182+
<p>You don&apos;t have any IPFS content yet.</p>
183183
) : (
184184
<table>
185185
<thead>

src/app/global-error.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default function GlobalError({ error, reset }) {
2020
<div className="error-container">
2121
<div className="error-card">
2222
<h2>Something went wrong!</h2>
23-
<p>We've encountered an unexpected error and our team has been notified.</p>
23+
<p>We&apos;ve encountered an unexpected error and our team has been notified.</p>
2424
<div className="error-actions">
2525
<button onClick={() => reset()} className="retry-button">
2626
Try again

src/app/help/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ export default function Help() {
179179

180180
<h3>How do I upload files to IPFS?</h3>
181181
<p>
182-
You'll need to use an IPFS client or service (like Pinata, Infura, or a local IPFS node)
183-
to upload files. Once uploaded, you'll receive a CID that you can add to your Basednet dashboard.
182+
You&apos;ll need to use an IPFS client or service (like Pinata, Infura, or a local IPFS node)
183+
to upload files. Once uploaded, you&apos;ll receive a CID that you can add to your Basednet dashboard.
184184
</p>
185185
</div>
186186
</div>

src/contexts/AuthContext.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client';
22

3-
import React, { createContext, useContext, useState, useEffect, ReactNode } from 'react';
3+
import React, { createContext, useContext, useState, useEffect, useCallback, ReactNode } from 'react';
44
import { useSession, signIn, signOut } from 'next-auth/react';
55
import { api } from '@/lib/api';
66

@@ -50,7 +50,7 @@ export function AuthProvider({ children }: { children: ReactNode }) {
5050
const [error, setError] = useState<string | null>(null);
5151

5252
// Function to fetch user data
53-
const fetchUserData = async () => {
53+
const fetchUserData = useCallback(async () => {
5454
if (!session?.user) {
5555
setUser(null);
5656
setProfile(null);
@@ -81,7 +81,7 @@ export function AuthProvider({ children }: { children: ReactNode }) {
8181
} finally {
8282
setIsLoading(false);
8383
}
84-
};
84+
}, [session?.user]);
8585

8686
// Fetch user data when session changes
8787
useEffect(() => {
@@ -90,7 +90,7 @@ export function AuthProvider({ children }: { children: ReactNode }) {
9090
}
9191

9292
fetchUserData();
93-
}, [session, status]);
93+
}, [session, status, fetchUserData]);
9494

9595
// Login function
9696
const login = async () => {
@@ -115,9 +115,9 @@ export function AuthProvider({ children }: { children: ReactNode }) {
115115
};
116116

117117
// Function to manually refresh user data
118-
const refreshUserData = async () => {
118+
const refreshUserData = useCallback(async () => {
119119
await fetchUserData();
120-
};
120+
}, [fetchUserData]);
121121

122122
// Context value
123123
const value = {

0 commit comments

Comments
 (0)