diff --git a/components/formatted/formattedLevelLink.tsx b/components/formatted/formattedLevelLink.tsx index ec5d3f753..0742b75b8 100644 --- a/components/formatted/formattedLevelLink.tsx +++ b/components/formatted/formattedLevelLink.tsx @@ -35,6 +35,8 @@ export default function FormattedLevelLink({ id, gameId, level, onClick }: Enric className='max-w-full' height={Dimensions.LevelCanvasHeight / 3} src={'/api/level/image/' + level._id + '.png'} + // TODO: localhost origin in renderToStaticMarkup doesn't work, should probably not be using renderToStaticMarkup if possible + // src={getUrl(GameId.THINKY, `/api/level/image/${level._id}.png`)} width={Dimensions.LevelCanvasWidth / 3} /> )} diff --git a/components/profile/profileAvatar.tsx b/components/profile/profileAvatar.tsx index b19ddac59..5c199251e 100644 --- a/components/profile/profileAvatar.tsx +++ b/components/profile/profileAvatar.tsx @@ -1,3 +1,5 @@ +import { GameId } from '@root/constants/GameId'; +import useUrl from '@root/hooks/useUrl'; import classNames from 'classnames'; import React, { useContext } from 'react'; import Dimensions from '../../constants/dimensions'; @@ -12,16 +14,17 @@ interface ProfileAvatarProps { } export default function ProfileAvatar({ hideStatusCircle, size = Dimensions.AvatarSize, user }: ProfileAvatarProps) { + const borderWidth = Math.round(size / 40) || 1; + const getUrl = useUrl(); const { multiplayerSocket } = useContext(AppContext); const connectedUser = multiplayerSocket.connectedPlayers.find(u => u._id === user._id); - const borderWidth = Math.round(size / 40) || 1; return (