File tree Expand file tree Collapse file tree 4 files changed +16
-3
lines changed Expand file tree Collapse file tree 4 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { TrackingPlacesSearchContext } from "../../../context/TrackingContext"
8
8
import { AggregatePlaceAttributes } from "../../../entities/Place/types"
9
9
import { explorerUrl } from "../../../entities/Place/utils"
10
10
import { SegmentPlace } from "../../../modules/segment"
11
+ import { getImageUrl } from "../../../utils/image"
11
12
import FavoriteBox from "../../Button/FavoriteBox"
12
13
import JumpInPositionButton from "../../Button/JumpInPositionButton"
13
14
import ShareBox from "../../Button/ShareBox"
@@ -60,7 +61,7 @@ export default React.memo(function PlaceDescription(
60
61
style = {
61
62
! loading && place ?. image
62
63
? {
63
- backgroundImage : `url(${ place . image } )` ,
64
+ backgroundImage : `url(${ getImageUrl ( place . image ) } )` ,
64
65
}
65
66
: { }
66
67
}
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import { AggregatePlaceAttributes } from "../../../entities/Place/types"
13
13
import { explorerUrl } from "../../../entities/Place/utils"
14
14
import locations from "../../../modules/locations"
15
15
import { SegmentPlace } from "../../../modules/segment"
16
+ import { getImageUrl } from "../../../utils/image"
16
17
import UserCount from "../../Label/UserCount/UserCount"
17
18
18
19
import "./PlaceFeatured.css"
@@ -37,7 +38,9 @@ export default React.memo(function PlaceFeatured(props: PlaceFeaturedProps) {
37
38
< div
38
39
className = { TokenList . join ( [ "place-featured" , loading && "loading" ] ) }
39
40
style = { {
40
- backgroundImage : `url("${ item . highlighted_image || item . image } ")` ,
41
+ backgroundImage : `url("${ getImageUrl (
42
+ item . highlighted_image || item . image
43
+ ) } ")`,
41
44
} }
42
45
>
43
46
< div className = "place-featured__overlay" />
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import TokenList from "decentraland-gatsby/dist/utils/dom/TokenList"
7
7
import { AggregatePlaceAttributes } from "../../../entities/Place/types"
8
8
import { explorerUrl } from "../../../entities/Place/utils"
9
9
import { SegmentPlace } from "../../../modules/segment"
10
+ import { getImageUrl } from "../../../utils/image"
10
11
import FavoriteBox from "../../Button/FavoriteBox"
11
12
import JumpInPositionButton from "../../Button/JumpInPositionButton"
12
13
import ShareBox from "../../Button/ShareBox"
@@ -58,7 +59,7 @@ export default React.memo(function WorldDescription(
58
59
style = {
59
60
! loading && world ?. image
60
61
? {
61
- backgroundImage : `url(${ world . image } )` ,
62
+ backgroundImage : `url(${ getImageUrl ( world . image ) } )` ,
62
63
}
63
64
: { }
64
65
}
Original file line number Diff line number Diff line change
1
+ import env from "decentraland-gatsby/dist/utils/env"
2
+
3
+ export function getImageUrl ( imageUrl ?: string | null ) {
4
+ if ( env ( "NEW_ROLLOUT" ) && imageUrl && imageUrl . startsWith ( "/" ) ) {
5
+ return `/places${ imageUrl } `
6
+ }
7
+ return imageUrl
8
+ }
You can’t perform that action at this time.
0 commit comments