Skip to content

Commit 4d70c72

Browse files
committed
Add unused API requests to add data to performance demo
1 parent c5a377a commit 4d70c72

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/screens/EmpowerPlant.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ const EmpowerPlant = ({navigation}) => {
6969
}, [navigation]);
7070

7171
React.useEffect(() => {
72+
fetch(`${BACKEND_URL}/success`) // exists just to add span data to demo
7273
loadData(); // this line is not blocking
73-
}, []);
74+
}, []);
7475

7576
return (
7677
<View style={styles.screen}>
@@ -162,9 +163,6 @@ export const selectImage = (source: string): React.ReactElement => {
162163

163164
const ProfiledImage = Sentry.withProfiler(Image);
164165

165-
/* You could wrap this with the Sentry Profiler,
166-
* but then you'd have hundreds/thousands of spans because the tools response is not paginated.
167-
*/
168166
const ProductItem = (props: {
169167
id: number;
170168
type: string;
@@ -173,6 +171,9 @@ const ProductItem = (props: {
173171
imgcropped: string;
174172
appDispatch: AppDispatch;
175173
}): React.ReactElement => {
174+
React.useEffect(() => {
175+
fetch(`${BACKEND_URL}/success`) // exists just to add span data to demo
176+
}, []);
176177
return (
177178
<View style={styles.statisticContainer}>
178179
<View style={styles.card}>{selectImage(props.imgcropped)}</View>

0 commit comments

Comments
 (0)