mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-06-26 18:26:38 +00:00
fix: resolve Bayer MGA provider bundling issues
- Fix TypeScript compilation errors in debug API route that were causing JavaScript bundling failures - Add proper type definitions for API responses and test results - Fix type conversions and parameter typing throughout debug route - Update auth controls with proper error state typing - Resolve 'Cannot access xs before initialization' runtime error in production This fixes the EKS deployment crash by eliminating TypeScript compilation issues that were causing JavaScript module loading problems.
This commit is contained in:
@@ -8,7 +8,7 @@ import { useState, useEffect } from 'react';
|
||||
*/
|
||||
export default function HeaderAuthControls() {
|
||||
// Error state for component-level error handling
|
||||
const [renderError, setRenderError] = useState(null);
|
||||
const [renderError, setRenderError] = useState<Error | null>(null);
|
||||
|
||||
// Call useAuth at the top level of the component as required by React hooks rules
|
||||
let authState;
|
||||
@@ -159,7 +159,7 @@ export default function HeaderAuthControls() {
|
||||
} catch (error) {
|
||||
// Catch any rendering errors
|
||||
console.error('Error rendering auth controls:', error);
|
||||
setRenderError(error);
|
||||
setRenderError(error instanceof Error ? error : new Error(String(error)));
|
||||
|
||||
// Return fallback UI
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user