import React, { memo, useEffect } from 'react';
import { useNavigate } from 'react-router-dom';
import { useBreadcrumb } from '../../layout/LayoutBreadcrumb';
import { Typography } from 'antd';

const { Text } = Typography;

const IndexEventAlarm = memo(function IndexEventAlarm() {
    const navigate = useNavigate();
    const { setBreadcrumbItems } = useBreadcrumb();

    useEffect(() => {
        const token = localStorage.getItem('token');
        if (token) {
            setBreadcrumbItems([
                { title: <Text strong style={{ fontSize: '14px' }}>• Event Alarm</Text> }
            ]);
        } else {
            navigate('/signin');
        }
    }, []);

    return (
        <div>
            <h1>Event Alarm Page</h1>
        </div>
    );
});

export default IndexEventAlarm;
