basic room display grid + buttons
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user