Skip to content

Commit

Permalink
add modification
Browse files Browse the repository at this point in the history
  • Loading branch information
asmaElouali committed May 18, 2024
1 parent ad3eb62 commit 136e41f
Show file tree
Hide file tree
Showing 42 changed files with 17,467 additions and 111 deletions.
174 changes: 68 additions & 106 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -1,118 +1,80 @@
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
*/
import React, { Component, useEffect } from "react";
import { View, Text, StyleSheet, Image } from "react-native";
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 { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
//import TabNavigator from "./src/navigator/TabNavigator";
import DetailsScreen from './src/screens/DetailsScreen';
import TabNavigator from "./src/navigator/TabNavigator";
import MenuData from "./src/data/MenuData";

import React from 'react';
import type {PropsWithChildren} from 'react';
import {
SafeAreaView,
ScrollView,
StatusBar,
StyleSheet,
Text,
useColorScheme,
View,
} from 'react-native';

import {
Colors,
DebugInstructions,
Header,
LearnMoreLinks,
ReloadInstructions,
} from 'react-native/Libraries/NewAppScreen';
/*const Stack = createNativeStackNavigator();
export default class App extends Component {
state: {};
constructor(props: any) {
super(props);
this.state = {
type SectionProps = PropsWithChildren<{
title: string;
}>;
};
}
render() {
return (
<NavigationContainer>
<Stack.Navigator screenOptions={{ headerShown: false }}>
<Stack.Screen
name="Tab"
component={TabNavigator}
options={{ animation: 'slide_from_bottom' }}>
</Stack.Screen>
<Stack.Screen
name="Details"
component={DetailsScreen}
options={{ animation: 'slide_from_bottom' }}>
</Stack.Screen>
</Stack.Navigator>
</NavigationContainer>
);
}
}*/

function Section({children, title}: SectionProps): React.JSX.Element {
const isDarkMode = useColorScheme() === 'dark';
/*const App = () => {
console.log("Globale data",MenuData[0].subcategories[0].items);
return (
<View style={styles.sectionContainer}>
<Text
style={[
styles.sectionTitle,
{
color: isDarkMode ? Colors.white : Colors.black,
},
]}>
{title}
</Text>
<Text
style={[
styles.sectionDescription,
{
color: isDarkMode ? Colors.light : Colors.dark,
},
]}>
{children}
</Text>
<View style={global_styles.content}>
<Menu />
</View>
);
}
};
function App(): React.JSX.Element {
const isDarkMode = useColorScheme() === 'dark';

const backgroundStyle = {
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
};
export default App;*/
const Stack = createNativeStackNavigator();

const App = () => {
/*useEffect(() => {
SplashScreen.hide();
}, []);*/
return (
<SafeAreaView style={backgroundStyle}>
<StatusBar
barStyle={isDarkMode ? 'light-content' : 'dark-content'}
backgroundColor={backgroundStyle.backgroundColor}
/>
<ScrollView
contentInsetAdjustmentBehavior="automatic"
style={backgroundStyle}>
<Header />
<View
style={{
backgroundColor: isDarkMode ? Colors.black : Colors.white,
}}>
<Section title="Step One">
Edit <Text style={styles.highlight}>App.tsx</Text> to change this
screen and then come back to see your edits.
</Section>
<Section title="See Your Changes">
<ReloadInstructions />
</Section>
<Section title="Debug">
<DebugInstructions />
</Section>
<Section title="Learn More">
Read the docs to discover what to do next:
</Section>
<LearnMoreLinks />
</View>
</ScrollView>
</SafeAreaView>
<NavigationContainer>
<Stack.Navigator screenOptions={{ headerShown: false }}>
<Stack.Screen
name="Tab"
component={TabNavigator}
options={{animation: 'slide_from_bottom'}}>
</Stack.Screen>
<Stack.Screen
name="Details"
component={DetailsScreen}
options={{ animation: 'slide_from_bottom' }}>
</Stack.Screen>
</Stack.Navigator>
</NavigationContainer>
);
}

const styles = StyleSheet.create({
sectionContainer: {
marginTop: 32,
paddingHorizontal: 24,
},
sectionTitle: {
fontSize: 24,
fontWeight: '600',
},
sectionDescription: {
marginTop: 8,
fontSize: 18,
fontWeight: '400',
},
highlight: {
fontWeight: '700',
},
});
};

export default App;
export default App;
Binary file added android/app/src/main/assets/fonts/app_icons.ttf
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.restaurantproject


import android.os.Bundle;
import com.facebook.react.ReactActivity
import com.facebook.react.ReactActivityDelegate
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
Expand All @@ -13,6 +15,10 @@ class MainActivity : ReactActivity() {
*/
override fun getMainComponentName(): String = "restaurantproject"

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(null)
}

/**
* Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
Expand Down
Binary file added android/app/src/main/res/drawable/humberger.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 android/app/src/main/res/drawable/salade.jpg
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 android/app/src/main/res/drawable/saladfile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions android/link-assets-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"migIndex": 1,
"data": [
{
"path": "src/assets/fonts/app_icons.ttf",
"sha1": "18e5fe2f93c853bbb495975f04df56438d595de5"
},
{
"path": "src/assets/images/nav_icons/humberger.png",
"sha1": "6d9e78516eb0ac37ce0284a0fbaf086a1ef02292"
},
{
"path": "src/assets/images/salade/salade.jpg",
"sha1": "4dfaa750f73b841b5584c1eff2d0c44292fcbe39"
},
{
"path": "src/assets/images/salade/saladfile.png",
"sha1": "f701b92eb6f2c55a4a7a4d296a69dd15ebc654db"
}
]
}
21 changes: 21 additions & 0 deletions ios/link-assets-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"migIndex": 1,
"data": [
{
"path": "src/assets/fonts/app_icons.ttf",
"sha1": "18e5fe2f93c853bbb495975f04df56438d595de5"
},
{
"path": "src/assets/images/nav_icons/humberger.png",
"sha1": "6d9e78516eb0ac37ce0284a0fbaf086a1ef02292"
},
{
"path": "src/assets/images/salade/salade.jpg",
"sha1": "4dfaa750f73b841b5584c1eff2d0c44292fcbe39"
},
{
"path": "src/assets/images/salade/saladfile.png",
"sha1": "f701b92eb6f2c55a4a7a4d296a69dd15ebc654db"
}
]
}
27 changes: 26 additions & 1 deletion ios/restaurantproject.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
7699B88040F8A987B510C191 /* libPods-restaurantproject-restaurantprojectTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-restaurantproject-restaurantprojectTests.a */; };
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
0A81438FF74A4427B44BF515 /* app_icons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = EB0A6741B76E4D75BE829FDD /* app_icons.ttf */; };
B31B1ED5B2B6433C923C3176 /* humberger.png in Resources */ = {isa = PBXBuildFile; fileRef = 913D24F6E9A141318499A04D /* humberger.png */; };
547561071C1D452EB2FDE134 /* saladfile.png in Resources */ = {isa = PBXBuildFile; fileRef = F627DF0B997E47C5ACB20D6D /* saladfile.png */; };
DC46F5D3228C41CF9942CC6D /* salade.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 92EDE6B08B8F441AA1346E7A /* salade.jpg */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -36,7 +40,7 @@
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = restaurantproject/Images.xcassets; sourceTree = "<group>"; };
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = restaurantproject/Info.plist; sourceTree = "<group>"; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = restaurantproject/main.m; sourceTree = "<group>"; };
13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = restaurantproject/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = restaurantproject/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
19F6CBCC0A4E27FBF8BF4A61 /* libPods-restaurantproject-restaurantprojectTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-restaurantproject-restaurantprojectTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
3B4392A12AC88292D35C810B /* Pods-restaurantproject.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-restaurantproject.debug.xcconfig"; path = "Target Support Files/Pods-restaurantproject/Pods-restaurantproject.debug.xcconfig"; sourceTree = "<group>"; };
5709B34CF0A7D63546082F79 /* Pods-restaurantproject.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-restaurantproject.release.xcconfig"; path = "Target Support Files/Pods-restaurantproject/Pods-restaurantproject.release.xcconfig"; sourceTree = "<group>"; };
Expand All @@ -45,6 +49,10 @@
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = restaurantproject/LaunchScreen.storyboard; sourceTree = "<group>"; };
89C6BE57DB24E9ADA2F236DE /* Pods-restaurantproject-restaurantprojectTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-restaurantproject-restaurantprojectTests.release.xcconfig"; path = "Target Support Files/Pods-restaurantproject-restaurantprojectTests/Pods-restaurantproject-restaurantprojectTests.release.xcconfig"; sourceTree = "<group>"; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
EB0A6741B76E4D75BE829FDD /* app_icons.ttf */ = {isa = PBXFileReference; name = "app_icons.ttf"; path = "../src/assets/fonts/app_icons.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
913D24F6E9A141318499A04D /* humberger.png */ = {isa = PBXFileReference; name = "humberger.png"; path = "../src/assets/images/nav_icons/humberger.png"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
F627DF0B997E47C5ACB20D6D /* saladfile.png */ = {isa = PBXFileReference; name = "saladfile.png"; path = "../src/assets/images/salade/saladfile.png"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
92EDE6B08B8F441AA1346E7A /* salade.jpg */ = {isa = PBXFileReference; name = "salade.jpg"; path = "../src/assets/images/salade/salade.jpg"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -124,6 +132,7 @@
83CBBA001A601CBA00E9B192 /* Products */,
2D16E6871FA4F8E400B85C8A /* Frameworks */,
BBD78D7AC51CEA395F1C20DB /* Pods */,
7AF62AE71E594FA981212428 /* Resources */,
);
indentWidth = 2;
sourceTree = "<group>";
Expand All @@ -150,6 +159,18 @@
path = Pods;
sourceTree = "<group>";
};
7AF62AE71E594FA981212428 /* Resources */ = {
isa = "PBXGroup";
children = (
EB0A6741B76E4D75BE829FDD /* app_icons.ttf */,
913D24F6E9A141318499A04D /* humberger.png */,
F627DF0B997E47C5ACB20D6D /* saladfile.png */,
92EDE6B08B8F441AA1346E7A /* salade.jpg */,
);
name = Resources;
sourceTree = "<group>";
path = "";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -245,6 +266,10 @@
files = (
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
0A81438FF74A4427B44BF515 /* app_icons.ttf in Resources */,
B31B1ED5B2B6433C923C3176 /* humberger.png in Resources */,
547561071C1D452EB2FDE134 /* saladfile.png in Resources */,
DC46F5D3228C41CF9942CC6D /* salade.jpg in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
7 changes: 5 additions & 2 deletions ios/restaurantproject/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,13 @@
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<!-- Do not change NSAllowsArbitraryLoads to true, or you will risk app rejection! -->
<key>NSAllowsArbitraryLoads</key>
<false/>
<key>NSAllowsLocalNetworking</key>
<true/>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<string/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
Expand All @@ -48,5 +47,9 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>UIAppFonts</key>
<array>
<string>app_icons.ttf</string>
</array>
</dict>
</plist>
Loading

0 comments on commit 136e41f

Please sign in to comment.