Skip to content

Commit 9e9d39d

Browse files
committed
fix: use local img instead of remote in tutorial
1 parent 02ee133 commit 9e9d39d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

mobile/services/tourguide.service.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
UserPublicDTOIntentionsEnum,
44
WeightedLatLngDTO,
55
} from "@/api/gen/src";
6+
import { Image } from "react-native";
67

78
export enum TOURKEY {
89
FIND = "find",
@@ -73,7 +74,8 @@ export const MOCK_ENCOUNTER = (
7374
age: 27,
7475
firstName: "Lisa",
7576
imageURIs: [
76-
"https://blog.offlinery.io/blogs/get-approached-as-women-e588a97a.jpg",
77+
Image.resolveAssetSource(require("../assets/lisa-example.jpg"))
78+
.uri,
7779
],
7880
intentions: [
7981
UserPublicDTOIntentionsEnum.friendship,

mobile/utils/media.utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ export const getValidImgURI = (
1414
} else if (
1515
img.includes("file:") ||
1616
img.trimStart().startsWith("/") ||
17-
img.trimStart().startsWith("https://")
17+
img.trimStart().startsWith("https://") ||
18+
img.trimStart().startsWith("http://")
1819
) {
1920
return img; // keep local file uri
2021
}

0 commit comments

Comments
 (0)