Remove the {...props} pattern and props coupling, and create an eslint rule for that (#1733)
* Remove the {...props} pattern and props coupling, and create an eslint rule for that
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
* Add another test to the new rule
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
---------
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
This commit is contained in:
@ -50,6 +50,7 @@ const StyledMainLogo = styled.div<StyledMainLogoProps>`
|
||||
export const Logo = ({ workspaceLogo, ...props }: Props) => {
|
||||
if (!workspaceLogo) {
|
||||
return (
|
||||
// eslint-disable-next-line twenty/no-spread-props
|
||||
<StyledContainer {...props}>
|
||||
<StyledMainLogo logo="/icons/android/android-launchericon-192-192.png" />
|
||||
</StyledContainer>
|
||||
@ -57,6 +58,7 @@ export const Logo = ({ workspaceLogo, ...props }: Props) => {
|
||||
}
|
||||
|
||||
return (
|
||||
// eslint-disable-next-line twenty/no-spread-props
|
||||
<StyledContainer {...props}>
|
||||
<StyledMainLogo logo={getImageAbsoluteURIOrBase64(workspaceLogo)} />
|
||||
<StyledTwentyLogoContainer>
|
||||
|
||||
@ -11,6 +11,7 @@ const StyledContent = styled(UIModal.Content)`
|
||||
type Props = React.ComponentProps<'div'>;
|
||||
|
||||
export const AuthModal = ({ children, ...restProps }: Props) => (
|
||||
// eslint-disable-next-line twenty/no-spread-props
|
||||
<UIModal isOpen={true} {...restProps}>
|
||||
<StyledContent>{children}</StyledContent>
|
||||
</UIModal>
|
||||
|
||||
@ -11,4 +11,5 @@ const StyledContainer = styled.div`
|
||||
text-align: center;
|
||||
`;
|
||||
|
||||
// eslint-disable-next-line twenty/no-spread-props
|
||||
export const FooterNote = (props: Props) => <StyledContainer {...props} />;
|
||||
|
||||
Reference in New Issue
Block a user