Fix imports and test flow

This commit is contained in:
gpt-engineer-app[bot]
2025-11-03 22:03:08 +00:00
parent 0b4c4c99ef
commit 6af981a6e4
124 changed files with 156 additions and 123 deletions

View File

@@ -0,0 +1,33 @@
/**
* Temporary test component to verify error logging system
* Delete this file after testing
*/
import { Button } from '@/components/ui/button';
import { handleError } from '@/lib/errorHandler';
import { supabase } from '@/lib/supabaseClient';
export function TestErrorLogging() {
const testError = () => {
try {
throw new Error('Test error for logging system verification');
} catch (error) {
handleError(error, {
action: 'Test Error Logging',
metadata: { test: true }
});
}
};
const testApiCall = async () => {
// This will generate breadcrumbs via the wrapped client
await supabase.from('parks').select('id').limit(1);
};
return (
<div className="p-4 space-y-4">
<h2 className="text-xl font-bold">Error Logging Test</h2>
<Button onClick={testError}>Generate Test Error</Button>
<Button onClick={testApiCall} variant="outline">Test API Breadcrumbs</Button>
</div>
);
}