trying to fix env

This commit is contained in:
Logan Cusano
2025-07-13 21:01:54 -04:00
parent acebbcfb56
commit 10c298a3ea
2 changed files with 7 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
'use client';
import { useState, FormEvent } from 'react';
import { useState, FormEvent, useEffect } from 'react';
import { useAuth } from '@/lib/auth';
import { API_URL } from '@/lib/api';
import { Button } from '@/components/ui/button';
@@ -13,6 +13,11 @@ const LoginPage = () => {
const [error, setError] = useState('');
const auth = useAuth();
const [isLoggedIn, setIsLoggedIn] = useState(false);
useEffect(() => {
console.log("API URL from env:", process.env.NEXT_PUBLIC_API_URL);
console.log("Test var from env:", process.env.NEXT_PUBLIC_TEST_VAR);
}, []);
const handleSubmit = async (e: FormEvent) => {
e.preventDefault();

View File

@@ -3,6 +3,7 @@ const nextConfig = {
reactStrictMode: true,
env: {
NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL,
NEXT_PUBLIC_TEST_VAR: 'This is a test',
},
};