Skip to content

Commit feaac23

Browse files
committed
fix: add default name and link to profile
1 parent 9c837af commit feaac23

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

web-marketplace/src/components/templates/ProjectDetails/ProjectDetails.utils.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { MouseEvent } from 'react';
2+
import { i18n } from '@lingui/core';
23
import { MapiResponse } from '@mapbox/mapbox-sdk/lib/classes/mapi-response';
34
import { GeocodeResponse } from '@mapbox/mapbox-sdk/services/geocoding';
45
import { getResizedImageUrl } from 'utils/image/getResizedImageUrl';
@@ -35,6 +36,7 @@ import {
3536
import { getSanityImgSrc } from 'lib/imgSrc';
3637

3738
import {
39+
DEFAULT_NAME,
3840
DEFAULT_PROFILE_COMPANY_AVATAR,
3941
DEFAULT_PROFILE_USER_AVATAR,
4042
} from 'pages/ProfileEdit/ProfileEdit.constants';
@@ -200,12 +202,12 @@ export function getAccount(
200202
}
201203

202204
return {
203-
name: account.name,
205+
name: account.name || i18n._(DEFAULT_NAME),
204206
description: account.description,
205207
type: account.type,
206208
image: image,
207209
address: account.addr || '',
208-
link: account?.websiteLink,
210+
link: account?.websiteLink || `/profiles/${account.id}`,
209211
};
210212
}
211213

0 commit comments

Comments
 (0)