- Added NotificationDrawer and InvitationItem components to enhance the notification system. - Refactored existing notification handling to improve user experience and maintainability. - Introduced new styles and structure for notifications using Tailwind CSS for better visual consistency. - Updated Navbar to include new components and improve overall layout. - Created a centralized navRoutes file for better route management within the navbar.
36 lines
1.0 KiB
TypeScript
36 lines
1.0 KiB
TypeScript
import { Button, Tooltip } from '@/shared/antd-imports';
|
|
import React, { memo, useCallback } from 'react';
|
|
import { colors } from '../../../styles/colors';
|
|
import { useTranslation } from 'react-i18next';
|
|
import { useNavigate } from 'react-router-dom';
|
|
import { useAppSelector } from '@/hooks/useAppSelector';
|
|
|
|
const UpgradePlanButton = memo(() => {
|
|
// localization
|
|
const { t } = useTranslation('navbar');
|
|
const navigate = useNavigate();
|
|
|
|
const themeMode = useAppSelector(state => state.themeReducer.mode);
|
|
|
|
return (
|
|
<Tooltip title={t('upgradePlanTooltip')}>
|
|
<Button
|
|
style={{
|
|
backgroundColor: themeMode === 'dark' ? '#b38750' : colors.lightBeige,
|
|
color: '#000000d9',
|
|
padding: '4px 11px',
|
|
}}
|
|
size="small"
|
|
type="text"
|
|
onClick={useCallback(() => navigate('/worklenz/admin-center/billing'), [navigate])}
|
|
>
|
|
{t('upgradePlan')}
|
|
</Button>
|
|
</Tooltip>
|
|
);
|
|
});
|
|
|
|
UpgradePlanButton.displayName = 'UpgradePlanButton';
|
|
|
|
export default UpgradePlanButton;
|