The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
feat(auth): enhance logo behavior and simplify billing logic (#11574)
Antoine Moreauxf30070c2c94a
diff --git a/packages/twenty-front/src/modules/auth/components/Logo.tsx b/packages/twenty-front/src/modules/auth/components/Logo.tsxindex 5b671a96f26..2efe26719bc 100644--- a/packages/twenty-front/src/modules/auth/components/Logo.tsx+++ b/packages/twenty-front/src/modules/auth/components/Logo.tsx@@ -1,6 +1,9 @@import styled from '@emotion/styled';import { isNonEmptyString } from '@sniptt/guards';import { REACT_APP_SERVER_BASE_URL } from '~/config';+import { useRedirectToDefaultDomain } from '~/modules/domain-manager/hooks/useRedirectToDefaultDomain';+import { AppPath } from '~/modules/types/AppPath';+import { UndecoratedLink } from 'twenty-ui/navigation';import { getImageAbsoluteURI } from 'twenty-shared/utils';type LogoProps = {@@ -45,6 +48,7 @@ const StyledPrimaryLogo = styled.div<{ src: string }>``;export const Logo = (props: LogoProps) => {+ const { redirectToDefaultDomain } = useRedirectToDefaultDomain();const defaultPrimaryLogoUrl = `${window.location.origin}/icons/android/android-launchericon-192-192.png`;const primaryLogoUrl = getImageAbsoluteURI({@@ -59,9 +63,20 @@ export const Logo = (props: LogoProps) => {}): null;+ const isUsingDefaultLogo = !props.primaryLogo;+return (<StyledContainer>- <StyledPrimaryLogo src={primaryLogoUrl ?? ''} />+ {isUsingDefaultLogo ? (+ <UndecoratedLink+ to={AppPath.SignInUp}+ onClick={redirectToDefaultDomain}+ >+ <StyledPrimaryLogo src={primaryLogoUrl ?? ''} />+ </UndecoratedLink>+ ) : (+ <StyledPrimaryLogo src={primaryLogoUrl ?? ''} />+ )}{secondaryLogoUrl && (<StyledSecondaryLogoContainer><StyledSecondaryLogo src={secondaryLogoUrl} />