Skip to content

Commit

Permalink
feature: drivers service
Browse files Browse the repository at this point in the history
  • Loading branch information
siradji authored and Suraj Auwal committed Dec 29, 2023
1 parent 57b3820 commit f71a4c5
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion mobile-app/api/_request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function getUrl (gateway: APIService = "VENDOR_GATEWAY"): string {
let url: string

if (environment === 'development') {
url = `${NetworkMapper.PLAYGROUND}:${PlaygroundServicePort[gateway]}/${ApiRoute[gateway]}/v1`
url = `https://588a-197-210-53-185.ngrok-free.app/${ApiRoute[gateway]}/v1`
} else {
url =`${NetworkMapper.PRODUCTION}/${ApiRoute[gateway]}/v1`
}
Expand Down
4 changes: 3 additions & 1 deletion mobile-app/hooks/useCachedResource.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import {useEffect, useState} from "react";
import {Logger} from '@api/logging.util'
import * as Font from 'expo-font'
import {MaterialIcons, MaterialCommunityIcons} from '@expo/vector-icons'
import { MaterialCommunityIcons} from '@expo/vector-icons'
import NanaOmnesBold from '@assets/app/fonts/nana-font-bold.otf'
import NanaOmnesRegular from '@assets/app/fonts/nana-font.otf'


/**
* Delaying splash screen to load additional resources prior to rendering the app
* @return boolean when loading complete
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {useNavigation} from "@react-navigation/native";
import * as Location from 'expo-location'
import * as ImagePicker from "expo-image-picker";
import { RootState, useAppDispatch, useAppSelector } from "@store/index";
import { ShowToast, showTost } from "@components/commons/Toast";
import { showTost } from "@components/commons/Toast";
import { fetchProfile } from "@store/profile.reducer";
import { _api } from "@api/_request";
import * as Device from 'expo-device'
Expand Down Expand Up @@ -169,7 +169,9 @@ export function RestaurantProfile (): JSX.Element {
const { status } = await Location.requestForegroundPermissionsAsync();

if (status !== 'granted') {
ShowToast('error', RestaurantProfileInteraction.GET_LOCATION_FAILED)
showTost(toast, RestaurantProfileInteraction.GET_LOCATION_FAILED, 'error')
setGettingLocation(false)
return
}
const {coords: {longitude, latitude}} = await Location.getCurrentPositionAsync({
accuracy: 6
Expand All @@ -180,7 +182,6 @@ export function RestaurantProfile (): JSX.Element {

showTost(toast, RestaurantProfileInteraction.COORD_UPDATE, 'success')

console.log([longitude, latitude])
try {
await _api.requestData({
method: 'put',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export function RestaurantSettings (): JSX.Element {
<DateTimePicker
style={tailwind('w-1/3')}
is24Hour
value={operationForm.startTime}
value={operationForm.cutoffTime}
mode='time'
onChange={(_, value) => {
updateTime('cutoffTime',value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function OnboardingScreen(): JSX.Element {
colors={['rgba(0,0,0,0.6)', 'rgba(0,0,0,0)']} // Adjust the overlay color and opacity here
style={tailwind('absolute top-0 left-0 right-0 bottom-0')}
/>
<View style={tailwind('w-full flex-1 mt-16 px-4')}>
<View style={tailwind('w-full flex-1 px-4')}>
<View style={tailwind('flex flex-col flex-grow w-full')}>
<Image
source={AppLogo}
Expand All @@ -47,7 +47,7 @@ export function OnboardingScreen(): JSX.Element {
</View>
</View>

<View style={tailwind('flex-1 mt-10')}>
<View style={tailwind('flex-1')}>
<GenericButton
onPress={() => navigator.navigate(OnboardingScreenName.SIGN_UP_PROFILE)}
label="Sign up"
Expand All @@ -56,7 +56,7 @@ export function OnboardingScreen(): JSX.Element {
testId="GenericButton.Onboarding.Continue"
/>
<GenericButton
style={tailwind('mt-5')}
style={tailwind('mt-3')}
onPress={() => navigator.navigate(OnboardingScreenName.LOGIN)}
label="Log in"
labelColor={tailwind('text-white text-2xl font-normal')}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, {useEffect, useRef, useState} from 'react';
import {TextInput, View} from 'react-native';
import {TextInput, View, ScrollView} from 'react-native';
import { tailwind } from '@tailwind';
import { StackScreenProps } from '@react-navigation/stack';
import { SafeAreaView } from 'react-native-safe-area-context';
Expand Down Expand Up @@ -103,7 +103,7 @@ export function SignupBusinessScreen({ route }: SignupBusinessProps): JSX.Elemen

return (
<SafeAreaView style={tailwind('flex-1 bg-white')}>
<View style={tailwind('flex-1 px-5')}>
<ScrollView style={tailwind('flex-1 px-5')}>
<View testID="SignupBusiness.View" style={tailwind('flex-col flex-grow')}>
<TextInputWithLabel
ref={businessNameRef}
Expand Down Expand Up @@ -149,7 +149,7 @@ export function SignupBusinessScreen({ route }: SignupBusinessProps): JSX.Elemen
/>
{!_loading && <LoginButtonWithText style={tailwind('text-brand-black-500')} />}
</View>
</View>
</ScrollView>
<WelcomeButtonSheet promptModalName="WELCOME_MODAL" modalRef={bottomSheetModalRef} />
</SafeAreaView>
);
Expand Down

0 comments on commit f71a4c5

Please sign in to comment.