'use client'; // Add this directive at the very top import React, { useState } from…
- User
'use client'; // Add this directive at the very top
import React, { useState } from 'react'; import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/card'; // Adjust based on actual component names import { Container } from '@/components/ui/container'; // Adjust based on actual component names import { Spinner } from '@/components/ui/spinner'; // Example spinner component
const Dashboard: React.FC = () => { const [isLoading, setIsLoading] = useState(true); const [isError, setIsError] = useState(false);
const handleIframeLoad = () => { console.log('Iframe has loaded'); setIsLoading(false); };
const handleIframeError = () => { console.error('Failed to load iframe'); setIsLoading(false); setIsError(true); };
return ( Server Dashboard {isLoading && ( )} {isError && ( Failed to load the dashboard. )} ); };
export default Dashboard;
remove spinner and Container
- Assistant