export default function Index()

in src/react-native-app/app/(tabs)/index.tsx [10:31]


export default function Index() {
  const { data: productList = [] } = useQuery({
    // TODO simplify react native demo for now by hard-coding the selected currency
    queryKey: ["products", "USD"],
    queryFn: () => ApiGateway.listProducts("USD"),
  });

  return (
    <ThemedView style={styles.container}>
      <ScrollView>
        {productList.length ? (
          <ProductList productList={productList} />
        ) : (
          <ThemedText>
            No products found, make sure the backend services for the
            OpenTelemetry demo are running
          </ThemedText>
        )}
      </ScrollView>
    </ThemedView>
  );
}