added token storage in a store, and improved layout on mobile

This commit is contained in:
2025-12-15 16:24:30 +01:00
parent d6a26c0d09
commit 0714088d4b
17 changed files with 170 additions and 154 deletions

View File

@@ -1,12 +1,12 @@
import { useAuthStore } from '../stores/auth'
import { initAuth } from '../stores/auth.ts'
const BASE_URL = 'http://localhost:8080'
const BASE_URL = 'http://192.168.1.183:8081'
export async function apiFetch<T>(
path: string,
options: RequestInit = {}
): Promise<T> {
const auth = useAuthStore()
const auth = await initAuth()
const res = await fetch(`${BASE_URL}${path}`, {
...options,