diff --git a/packages/twenty-front/src/modules/ui/navigation/link/components/UndecoratedLink.tsx b/packages/twenty-front/src/modules/ui/navigation/link/components/UndecoratedLink.tsx index c5c6e2ed15e8..09cae367bacf 100644 --- a/packages/twenty-front/src/modules/ui/navigation/link/components/UndecoratedLink.tsx +++ b/packages/twenty-front/src/modules/ui/navigation/link/components/UndecoratedLink.tsx @@ -1,8 +1,15 @@ import styled from '@emotion/styled'; import React from 'react'; -import { Link } from 'react-router-dom'; +import { Link, LinkProps } from 'react-router-dom'; -const StyledUndecoratedLink = styled(Link)<{ fullWidth: boolean }>` +type StyledLinkProps = LinkProps & { + fullWidth?: boolean; +}; + +const StyledUndecoratedLink = styled( + // eslint-disable-next-line react/jsx-props-no-spreading + ({ fullWidth: _, ...props }: StyledLinkProps) => , +)` text-decoration: none; width: ${({ fullWidth }) => (fullWidth ? '100%' : 'auto')}; `;