import { useTranslation } from 'react-i18next'; import Box from '@mui/material/Box'; import React from 'react'; import type { SxProps, Theme } from '@mui/material'; interface WrapperProps { hasPermission?: boolean; children?: React.ReactNode; className?: string; style?: React.CSSProperties; sx?: SxProps; } const Wrapper = ({ hasPermission = true, children, className, style, sx, }: WrapperProps) => { const { t } = useTranslation(); return ( {children} {!hasPermission && ( {t('noPermissionTip')} )} ); }; export default Wrapper;