Fix login issue (#9012)

Co-authored-by: Weiko <corentin@twenty.com>
This commit is contained in:
Charles Bochet
2024-12-11 15:42:53 +01:00
committed by GitHub
parent ad04040ea6
commit 224b6d1334
12 changed files with 145 additions and 65 deletions

View File

@ -1,5 +1,6 @@
import styled from '@emotion/styled';
import { getImageAbsoluteURI, isDefined } from 'twenty-ui';
import { isNonEmptyString } from '@sniptt/guards';
import { getImageAbsoluteURI } from 'twenty-ui';
type LogoProps = {
primaryLogo?: string | null;
@ -48,7 +49,7 @@ export const Logo = (props: LogoProps) => {
const primaryLogoUrl = getImageAbsoluteURI(
props.primaryLogo ?? defaultPrimaryLogoUrl,
);
const secondaryLogoUrl = isDefined(props.secondaryLogo)
const secondaryLogoUrl = isNonEmptyString(props.secondaryLogo)
? getImageAbsoluteURI(props.secondaryLogo)
: null;

View File

@ -42,9 +42,9 @@ import { getTimeFormatFromWorkspaceTimeFormat } from '@/localization/utils/getTi
import { currentUserState } from '../states/currentUserState';
import { tokenPairState } from '../states/tokenPairState';
import { useLastAuthenticatedWorkspaceDomain } from '@/domain-manager/hooks/useLastAuthenticatedWorkspaceDomain';
import { isMultiWorkspaceEnabledState } from '@/client-config/states/isMultiWorkspaceEnabledState';
import { useIsCurrentLocationOnAWorkspaceSubdomain } from '@/domain-manager/hooks/useIsCurrentLocationOnAWorkspaceSubdomain';
import { useLastAuthenticatedWorkspaceDomain } from '@/domain-manager/hooks/useLastAuthenticatedWorkspaceDomain';
import { useReadWorkspaceSubdomainFromCurrentLocation } from '@/domain-manager/hooks/useReadWorkspaceSubdomainFromCurrentLocation';
import { domainConfigurationState } from '@/domain-manager/states/domainConfigurationState';