Added bodyshop querying before starting application. Basic job query and list view.
This commit is contained in:
@@ -47,9 +47,7 @@ const JobStackNavigator = () => (
|
||||
<JobStack.Screen
|
||||
name="JobList"
|
||||
options={({ route }) => ({
|
||||
title: `${i18n.t("joblist.labels.activejobs")} ${
|
||||
JSON.stringify(route.params) | "X"
|
||||
}`,
|
||||
title: `${i18n.t("joblist.labels.activejobs")}`,
|
||||
})}
|
||||
component={ScreenJobList}
|
||||
/>
|
||||
@@ -96,19 +94,32 @@ const DrawerNavigator = () => (
|
||||
</Drawer.Navigator>
|
||||
);
|
||||
|
||||
export function ScreenMainComponent({ checkUserSession, currentUser }) {
|
||||
export function ScreenMainComponent({
|
||||
checkUserSession,
|
||||
currentUser,
|
||||
bodyshop,
|
||||
}) {
|
||||
useEffect(() => {
|
||||
checkUserSession();
|
||||
}, [checkUserSession]);
|
||||
|
||||
const { t } = useTranslation();
|
||||
|
||||
useEffect(() => {
|
||||
if (currentUser.authorized) console.log("Authed");
|
||||
//Do the saga shit.
|
||||
}, [currentUser]);
|
||||
|
||||
return (
|
||||
<NavigationContainer>
|
||||
{currentUser.authorized === null ? (
|
||||
<ScreenSplash />
|
||||
) : currentUser.authorized ? (
|
||||
<DrawerNavigator />
|
||||
bodyshop ? (
|
||||
<DrawerNavigator />
|
||||
) : (
|
||||
<ScreenSplash />
|
||||
)
|
||||
) : (
|
||||
<ScreenSignIn />
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user