Fix broken image urls in Settings > Profile and Invite To Workspace Email (#8942)
Fixes #8601 We had 3 implementations of getImageAbsoluteURI: in twenty-front, in twenty-ui and in twenty-emails. I was able to remove the one in twenty-front but I could not remove it from twenty-emails as this is a standalone for now. The vision is to introduce shared utils in a twenty-shared package
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
import styled from '@emotion/styled';
|
||||
|
||||
import { getImageAbsoluteURI } from '~/utils/image/getImageAbsoluteURI';
|
||||
import { getImageAbsoluteURI, isDefined } from 'twenty-ui';
|
||||
|
||||
type LogoProps = {
|
||||
primaryLogo?: string | null;
|
||||
@ -49,7 +48,9 @@ export const Logo = (props: LogoProps) => {
|
||||
const primaryLogoUrl = getImageAbsoluteURI(
|
||||
props.primaryLogo ?? defaultPrimaryLogoUrl,
|
||||
);
|
||||
const secondaryLogoUrl = getImageAbsoluteURI(props.secondaryLogo);
|
||||
const secondaryLogoUrl = isDefined(props.secondaryLogo)
|
||||
? getImageAbsoluteURI(props.secondaryLogo)
|
||||
: null;
|
||||
|
||||
return (
|
||||
<StyledContainer>
|
||||
|
||||
Reference in New Issue
Block a user