Skip to content

Commit b878cc3

Browse files
committed
2 parents 49fdf0a + fc96a03 commit b878cc3

6 files changed

Lines changed: 125 additions & 559 deletions

File tree

.github/workflows/ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,15 @@ jobs:
7878
- name: Install dependencies
7979
run: npm ci
8080

81+
- name: Set up environment variables
82+
run: |
83+
echo "🔧 Setting up environment variables for build..."
84+
echo "NEXT_PUBLIC_API_URL=http://localhost:3000/api" >> .env.local
85+
echo "NEXT_PUBLIC_APP_URL=http://localhost:3000" >> .env.local
86+
echo "NEXTAUTH_SECRET=ci-test-secret-key" >> .env.local
87+
echo "NEXTAUTH_URL=http://localhost:3000" >> .env.local
88+
echo "DATABASE_URL=postgresql://test:test@localhost:5432/test_db" >> .env.local
89+
8190
- name: Build application
8291
run: npm run build
8392

@@ -191,6 +200,15 @@ jobs:
191200
- name: Install dependencies
192201
run: npm ci
193202

203+
- name: Set up environment variables
204+
run: |
205+
echo "🔧 Setting up environment variables for build..."
206+
echo "NEXT_PUBLIC_API_URL=http://localhost:3000/api" >> .env.local
207+
echo "NEXT_PUBLIC_APP_URL=http://localhost:3000" >> .env.local
208+
echo "NEXTAUTH_SECRET=ci-test-secret-key" >> .env.local
209+
echo "NEXTAUTH_URL=http://localhost:3000" >> .env.local
210+
echo "DATABASE_URL=postgresql://test:test@localhost:5432/test_db" >> .env.local
211+
194212
- name: Build with bundle analysis
195213
run: |
196214
npm run build
@@ -223,6 +241,15 @@ jobs:
223241
- name: Install dependencies
224242
run: npm ci
225243

244+
- name: Set up environment variables
245+
run: |
246+
echo "🔧 Setting up environment variables for build..."
247+
echo "NEXT_PUBLIC_API_URL=http://localhost:3000/api" >> .env.local
248+
echo "NEXT_PUBLIC_APP_URL=http://localhost:3000" >> .env.local
249+
echo "NEXTAUTH_SECRET=ci-test-secret-key" >> .env.local
250+
echo "NEXTAUTH_URL=http://localhost:3000" >> .env.local
251+
echo "DATABASE_URL=postgresql://test:test@localhost:5432/test_db" >> .env.local
252+
226253
- name: Build application
227254
run: npm run build
228255

@@ -264,6 +291,15 @@ jobs:
264291
- name: Install dependencies
265292
run: npm ci
266293

294+
- name: Set up environment variables
295+
run: |
296+
echo "🔧 Setting up environment variables for build..."
297+
echo "NEXT_PUBLIC_API_URL=http://localhost:3000/api" >> .env.local
298+
echo "NEXT_PUBLIC_APP_URL=http://localhost:3000" >> .env.local
299+
echo "NEXTAUTH_SECRET=ci-test-secret-key" >> .env.local
300+
echo "NEXTAUTH_URL=http://localhost:3000" >> .env.local
301+
echo "DATABASE_URL=postgresql://test:test@localhost:5432/test_db" >> .env.local
302+
267303
- name: Build application
268304
run: npm run build
269305

@@ -295,6 +331,15 @@ jobs:
295331
- name: Install dependencies
296332
run: npm ci
297333

334+
- name: Set up environment variables
335+
run: |
336+
echo "🔧 Setting up environment variables for build..."
337+
echo "NEXT_PUBLIC_API_URL=http://localhost:3000/api" >> .env.local
338+
echo "NEXT_PUBLIC_APP_URL=http://localhost:3000" >> .env.local
339+
echo "NEXTAUTH_SECRET=ci-test-secret-key" >> .env.local
340+
echo "NEXTAUTH_URL=http://localhost:3000" >> .env.local
341+
echo "DATABASE_URL=postgresql://test:test@localhost:5432/test_db" >> .env.local
342+
298343
- name: Build application
299344
run: npm run build
300345

components/landing-page/navbar.tsx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,16 @@ export function Navbar() {
208208
);
209209
}
210210

211-
function AuthenticatedNav({ user }: { user: any }) {
211+
function AuthenticatedNav({
212+
user,
213+
}: {
214+
user: {
215+
name?: string | null;
216+
email?: string | null;
217+
image?: string | null;
218+
profile?: { firstName?: string | null; avatar?: string | null };
219+
} | null;
220+
}) {
212221
const { logout } = useZustandAuth(false);
213222

214223
return (
@@ -294,7 +303,12 @@ function MobileMenu({
294303
}: {
295304
isAuthenticated: boolean;
296305
isLoading: boolean;
297-
user: any;
306+
user: {
307+
name?: string | null;
308+
email?: string | null;
309+
image?: string | null;
310+
profile?: { firstName?: string | null; avatar?: string | null };
311+
} | null;
298312
}) {
299313
const mobileMenuRef = useRef<HTMLDivElement>(null);
300314
const mobileButtonRef = useRef<HTMLButtonElement>(null);

next.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const nextConfig: NextConfig = {
44
/* config options here */
55
outputFileTracingRoot: __dirname,
66
images: {
7+
domains: ['i.pravatar.cc'],
78
remotePatterns: [
89
{
910
protocol: 'https',

0 commit comments

Comments
 (0)