basic room display grid + buttons

This commit is contained in:
2025-12-04 12:27:31 +01:00
parent 61a7ab64d1
commit 787a248e6f
10 changed files with 241 additions and 12 deletions

View File

@@ -3,9 +3,12 @@ import reactLogo from './assets/react.svg'
import viteLogo from '/vite.svg'
import './App.css'
import { API_BASE } from './config.js'
import Login from './components/login.jsx'
import MainApp from './components/MainApp.jsx'
export default function App() {
const [loading, setLoading] = useState(true); // true while checking auth
const [loggedIn, setLoggedIn] = useState(false);
@@ -14,7 +17,7 @@ export default function App() {
async function checkAuth() {
try {
// This endpoint should validate the refresh token cookie and return an access token
const res = await fetch("http://localhost:7080/auth/login_refresh_token", {
const res = await fetch(`${API_BASE}/auth/login_refresh_token`, {
method: "POST",
headers: {
"Content-Type": "application/json",