configurable url

This commit is contained in:
Stefan Hardegger
2025-07-24 08:03:56 +02:00
parent 4bbc14d165
commit 77ad643eac
15 changed files with 257 additions and 26 deletions

View File

@@ -2,6 +2,7 @@
import { createContext, useContext, useEffect, useState } from 'react';
import { authApi } from '../lib/api';
import { preloadSanitizationConfig } from '../lib/sanitization';
interface AuthContextType {
isAuthenticated: boolean;
@@ -30,7 +31,17 @@ export function AuthProvider({ children }: { children: React.ReactNode }) {
}
};
// Preload sanitization config for content formatting
const loadSanitizationConfig = async () => {
try {
await preloadSanitizationConfig();
} catch (error) {
console.error('Failed to preload sanitization config:', error);
}
};
checkAuth();
loadSanitizationConfig();
}, []);
const login = async (password: string) => {