import React from 'react'; import { Stack, Text, Button } from '@mantine/core'; import { useTranslation } from 'react-i18next'; import { useAuth } from '@app/auth/UseSession'; import { useNavigate } from 'react-router-dom'; import CoreGeneralSection from '@core/components/shared/config/configSections/GeneralSection'; /** * Proprietary extension of GeneralSection that adds account management */ const GeneralSection: React.FC = () => { const { t } = useTranslation(); const { signOut, user } = useAuth(); const navigate = useNavigate(); const handleLogout = async () => { try { await signOut(); navigate('/login'); } catch (error) { console.error('Logout error:', error); } }; return (
{t('settings.general.title', 'General')} {t('settings.general.description', 'Configure general application preferences.')}
{user && ( {t('settings.general.user', 'User')}: {user.email || user.username} )}
{/* Render core general section preferences (without title since we show it above) */}
); }; export default GeneralSection;