Skip to content

Commit

Permalink
modification
Browse files Browse the repository at this point in the history
  • Loading branch information
asmaElouali committed Aug 19, 2024
1 parent 9bd173e commit 0941e71
Show file tree
Hide file tree
Showing 31 changed files with 1,515 additions and 923 deletions.
118 changes: 72 additions & 46 deletions App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ import { global_styles } from './src/style/globalstyle';
//import DinningTable from "./screens/DinningTable";
//import Pinauthentication from "./screens/Pinauthentication";
//import AppNavigator from "./navigator/app.navigator";
import Menu from "./src/screens/Menu";
import SplashScreen from 'react-native-splash-screen';
import { DefaultTheme, NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { createNativeStackNavigator, NativeStackScreenProps } from '@react-navigation/native-stack';
//import TabNavigator from "./src/navigator/TabNavigator";
import DetailsScreen from './src/screens/DetailsScreen';
import TabNavigator from "./src/navigator/TabNavigator";
Expand Down Expand Up @@ -35,6 +34,15 @@ import { COLORS } from "./src/theme/theme";
// { PersistGate } from "redux-persist/integration/react";
import Toast from 'react-native-toast-message';
import RestaurantScreen from "./src/screens/RestaurantScreen";
import DinningTableScreen from "./src/screens/DinningTableScreen";
import Menu from "./src/screens/Menu";
import Cart from "./src/screens/CartScreen";
import CartScreen from "./src/screens/CartScreen";
import OrderHistoryScreen from "./src/screens/OrderHistoryScreen";
import { StripeProvider } from '@stripe/stripe-react-native';
import Setting from "./src/screens/Setting";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { BlurView } from "@react-native-community/blur";



Expand Down Expand Up @@ -111,6 +119,38 @@ export default class App extends Component {
};
export default App;*/
// Create Tab Navigator
const Tab = createBottomTabNavigator<RootStackParamList>();

type Props = NativeStackScreenProps<RootStackParamList, "MainTab">;
const MainTabNavigator: React.FC<Props> = () => {
return (
<Tab.Navigator screenOptions={{
tabBarHideOnKeyboard: true,
headerShown: false,
tabBarShowLabel: false,
tabBarBackground: () => (
<BlurView
overlayColor=""
blurAmount={15}
/>
),
}}>
<Tab.Screen name="Order" component={OrderHistoryScreen} options={{
tabBarStyle: { display: 'none' }, // Hide this tab
}} />
<Tab.Screen name="Cart" component={CartScreen} options={{
tabBarStyle: { display: 'none' }, // Hide this tab
}} />
<Tab.Screen name="Setting" component={Setting} options={{
tabBarStyle: { display: 'none' }, // Hide this tab
}} />
</Tab.Navigator>
);
}



const Stack = createNativeStackNavigator<RootStackParamList>();
const theme = {
...DefaultTheme,
Expand All @@ -124,51 +164,37 @@ const App = () => {
SplashScreen.hide();
}, []);
return (
<StripeProvider publishableKey="pk_test_51Po0RjIcOPMbNsR4Y47qYO5p9ShpXgZk96K8Scbnj9YuqlFundVNtUReN8cX5NKIxXb8htmoSwIfDdRsNfHL0ac500OSQWcPt9">
<NavigationContainer theme={theme}>
<Stack.Navigator screenOptions={{ headerShown: false }}>


<NavigationContainer theme={theme}>
<Stack.Navigator screenOptions={{ headerShown: false }}>

<Stack.Screen
name="Welcome"
component={Welcome}
options={{ animation: 'slide_from_bottom' }} >
</Stack.Screen>
<Stack.Screen name="Login" component={LoginScreen} />
<Stack.Screen name="Restaurant" component={RestaurantScreen}/>
<Stack.Screen
name="rvc"
component={RvcScreen}
options={{ animation: 'slide_from_bottom' }} >
</Stack.Screen>
<Stack.Screen
name="history"
component={OrderHistory}
options={{ animation: 'slide_from_bottom' }} >
</Stack.Screen>
<Stack.Screen
name="Tab"
component={TabNavigator}
options={{ animation: 'slide_from_bottom' }}>
</Stack.Screen>
<Stack.Screen
name="qr-code"
component={Scanner}
options={{ animation: 'slide_from_bottom' }} >
</Stack.Screen>
<Stack.Screen
name="Details"
component={DetailsScreen}
options={{ animation: 'slide_from_bottom' }}>
</Stack.Screen>
<Stack.Screen
name="Payment"
component={PaymentScreen}
options={{ animation: 'slide_from_bottom' }}>
</Stack.Screen>
</Stack.Navigator>
<Toast />
</NavigationContainer>
<Stack.Screen
name="Welcome"
component={Welcome}
options={{ animation: 'slide_from_bottom' }} >
</Stack.Screen>
<Stack.Screen name="Login" component={LoginScreen} />
<Stack.Screen name="Restaurant" component={RestaurantScreen} />
<Stack.Screen name="DinningTable" component={DinningTableScreen} />
<Stack.Screen name="Menus" component={Menu} />
<Stack.Screen name="Details" component={DetailsScreen} />
<Stack.Screen name="Cart" component={CartScreen} />
<Stack.Screen name="Order" component={OrderHistoryScreen} />
<Stack.Screen
name="Payment"
component={PaymentScreen}
options={{ animation: 'slide_from_bottom' }}>
</Stack.Screen>
<Stack.Screen
name="Setting"
component={Setting}
options={{ animation: 'slide_from_bottom' }}>
</Stack.Screen>
<Stack.Screen name="MainTab" component={MainTabNavigator} />
</Stack.Navigator>
<Toast />
</NavigationContainer>
</StripeProvider>


);
Expand Down
2 changes: 2 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ android {
dependencies {
// The version of react-native is set by the React Native Gradle
implementation("com.facebook.react:react-android")
implementation("com.google.android.gms:play-services-wallet:**.*.*")
implementation("com.android.support:appcompat-v7:**.*.*")


if (hermesEnabled.toBoolean()) {
Expand Down
5 changes: 5 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.SEND_SMS" />



<application
Expand All @@ -19,6 +21,9 @@
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
android:exported="true">
<meta-data
android:name="com.google.android.gms.wallet.api.anabled"
android:value="true" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Expand Down
31 changes: 31 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"@react-navigation/native": "^6.1.17",
"@react-navigation/native-stack": "^6.9.26",
"@reduxjs/toolkit": "^2.2.6",
"@stripe/stripe-react-native": "^0.38.4",
"@types/jwt-decode": "^3.1.0",
"@typescript-eslint/eslint-plugin": "^7.11.0",
"axios": "^1.7.2",
Expand All @@ -25,6 +26,7 @@
"jwt-decode": "^4.0.0",
"ktlint": "^0.0.5",
"lottie-react-native": "^6.7.2",
"moment": "^2.30.1",
"react": "18.2.0",
"react-native": "0.74.1",
"react-native-action-sheet": "^2.2.0",
Expand All @@ -33,6 +35,7 @@
"react-native-dropdown-picker": "^5.4.6",
"react-native-keychain": "^8.2.0",
"react-native-linear-gradient": "^2.8.3",
"react-native-mail": "^6.1.1",
"react-native-modal": "^13.0.1",
"react-native-paper": "^5.12.3",
"react-native-qrcode-scanner": "^1.5.5",
Expand Down
Binary file added src/assets/images/setting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/user.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions src/components/BGIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

import {StyleSheet, Text, View} from 'react-native';
import React from 'react';
import {BorderRadius, SPACING} from '../theme/theme';
import CustomIcon from './CustomIcon';

interface BGIconProps {
name: string;
color: string;
size: number;
BGColor: string;
}

const BGIcon: React.FC<BGIconProps> = ({name, color, size, BGColor}) => {
return (
<View style={[styles.IconBG, {backgroundColor: BGColor}]}>
<CustomIcon name={name} color={color} size={size} />
</View>
);
};

const styles = StyleSheet.create({
IconBG: {
height: SPACING.space_30,
width: SPACING.space_30,
justifyContent: 'center',
alignItems: 'center',
borderRadius: BorderRadius.radius_8,
},
});

export default BGIcon;
Loading

0 comments on commit 0941e71

Please sign in to comment.