Added bodyshop querying before starting application. Basic job query and list view.

This commit is contained in:
Patrick Fic
2020-08-12 16:39:03 -07:00
parent 1f8d16370a
commit 7cc384e7ff
14 changed files with 167 additions and 186 deletions

View File

@@ -1,18 +1,7 @@
import { Container, Content } from "native-base";
import React from "react";
import { View, Text, Button } from "react-native";
import { useTranslation } from "react-i18next";
import { useQuery, useLazyQuery, useSubscription } from "@apollo/client";
import { QUERY_BODYSHOP } from "../../graphql/bodyshop.queries.js";
import JobListComponent from "../job-list/job-list.component.jsx";
export default function ScreenJobList({ navigation }) {
const { t } = useTranslation();
const { loading, error, data } = useSubscription(QUERY_BODYSHOP);
console.log("ScreenJobList -> error", error);
console.log("ScreenJobList -> loading", loading);
console.log("BodyshopData", data);
return (
<View>
<Text>This is the Job List.</Text>
<Text>{t("joblist.labels.activejobs")}</Text>
</View>
);
return <JobListComponent />;
}