🤖 format everything with pre-commit by stirlingbot (#4175)

Auto-generated by [create-pull-request][1] with **stirlingbot**

[1]: https://github.com/peter-evans/create-pull-request

Signed-off-by: stirlingbot[bot] <stirlingbot[bot]@users.noreply.github.com>
Co-authored-by: stirlingbot[bot] <195170888+stirlingbot[bot]@users.noreply.github.com>
This commit is contained in:
stirlingbot[bot] 2025-08-11 14:14:41 +01:00 committed by DarioGii
parent 0e70729e38
commit b5cd301678
2 changed files with 7 additions and 6 deletions

View File

@ -71,12 +71,12 @@ export const AppConfigProvider: React.FC<{ children: React.ReactNode }> = ({ chi
const isLoginPage = window.location.pathname.includes('/login');
const hasJwt = !!localStorage.getItem('stirling_jwt');
if (isLoginPage && !hasJwt) {
console.debug('[AppConfigContext] On login page without JWT - using default config');
setConfig({ enableLogin: true });
setLoading(false);
return;
}
if (isLoginPage && !hasJwt) {
console.debug('[AppConfig] On login page without JWT - using default config');
setConfig({ enableLogin: true });
setLoading(false);
return;
}
try {
setLoading(true);

View File

@ -9,6 +9,7 @@ function getAuthHeaders(): HeadersInit {
/**
* Hook to check if a specific endpoint is enabled
* This wraps the context for single endpoint checks
*/
export function useEndpointEnabled(endpoint: string): {
enabled: boolean | null;