configurable url
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user