fix(signinup): several issues (#12698)
- Fixed an issue where you have invitations in your available workspaces for signup. - Corrected the URL display in the browser when hovering over the twenty logo on the sign-in/up form. - The workspace list is now displayed when you are logged into the default domain.
This commit is contained in:
@@ -5,7 +5,7 @@ import { Avatar } from 'twenty-ui/display';
|
||||
import { UndecoratedLink } from 'twenty-ui/navigation';
|
||||
import { REACT_APP_SERVER_BASE_URL } from '~/config';
|
||||
import { useRedirectToDefaultDomain } from '~/modules/domain-manager/hooks/useRedirectToDefaultDomain';
|
||||
import { AppPath } from '~/modules/types/AppPath';
|
||||
import { useReadDefaultDomainFromConfiguration } from '@/domain-manager/hooks/useReadDefaultDomainFromConfiguration';
|
||||
|
||||
type LogoProps = {
|
||||
primaryLogo?: string | null;
|
||||
@@ -59,6 +59,8 @@ export const Logo = ({
|
||||
const { redirectToDefaultDomain } = useRedirectToDefaultDomain();
|
||||
const defaultPrimaryLogoUrl = `${window.location.origin}/images/icons/android/android-launchericon-192-192.png`;
|
||||
|
||||
const { defaultUrl } = useReadDefaultDomainFromConfiguration();
|
||||
|
||||
const primaryLogoUrl = getImageAbsoluteURI({
|
||||
imageUrl: primaryLogo ?? defaultPrimaryLogoUrl,
|
||||
baseUrl: REACT_APP_SERVER_BASE_URL,
|
||||
@@ -77,7 +79,7 @@ export const Logo = ({
|
||||
<StyledContainer onClick={() => onClick?.()}>
|
||||
{isUsingDefaultLogo ? (
|
||||
<UndecoratedLink
|
||||
to={AppPath.SignInUp}
|
||||
to={defaultUrl.toString()}
|
||||
onClick={redirectToDefaultDomain}
|
||||
>
|
||||
<StyledPrimaryLogo src={primaryLogoUrl} />
|
||||
|
||||
Reference in New Issue
Block a user