Skip to content

Commit cdf689c

Browse files
first commit
0 parents  commit cdf689c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+30210
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/node_modules
2+
/.env

QuickPick/.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
node_modules/
2+
.expo/
3+
dist/
4+
npm-debug.*
5+
*.jks
6+
*.p8
7+
*.p12
8+
*.key
9+
*.mobileprovision
10+
*.orig.*
11+
web-build/
12+
13+
# macOS
14+
.DS_Store
15+
16+
# Temporary files created by Metro to check the health of the file watcher
17+
.metro-health-check*

QuickPick/App.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import Main from './Main';
2+
import { Provider } from "react-redux";
3+
import store from "./redux/store";
4+
5+
export default function App() {
6+
return (
7+
<Provider store={store}>
8+
<Main />
9+
</Provider>
10+
)
11+
}

QuickPick/Main.jsx

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import React, { useEffect } from 'react'
2+
import { NavigationContainer } from '@react-navigation/native'
3+
import { createNativeStackNavigator } from '@react-navigation/native-stack'
4+
import { useDispatch, useSelector } from 'react-redux'
5+
import { loadUser } from './redux/action'
6+
import Home from './screens/Home'
7+
import Login from './screens/Login'
8+
import Register from './screens/Register'
9+
import Profile from './screens/Profile'
10+
import Address from './screens/Address'
11+
import Orders from './screens/Orders'
12+
import Cart from './screens/Cart'
13+
import Products from './screens/Products'
14+
import Verify from './screens/Verify'
15+
import ChangePassword from './screens/ChangePassword'
16+
import ForgetPassword from './screens/ForgetPassword'
17+
import ResetPassword from './screens/ResetPassword'
18+
import Loader from "./components/Loader"
19+
20+
21+
const Stack = createNativeStackNavigator()
22+
23+
const Main = () => {
24+
const dispatch = useDispatch()
25+
26+
useEffect(() => {
27+
dispatch(loadUser())
28+
}, [dispatch])
29+
30+
const { isAuthenticated, loading } = useSelector(state => state.auth)
31+
32+
return (
33+
loading ? <Loader /> : <NavigationContainer>
34+
35+
<Stack.Navigator initialRouteName={isAuthenticated ? "home" : "login"}>
36+
<Stack.Screen name='home' component={Home} options={{ headerShown: false }} />
37+
<Stack.Screen name='login' component={Login} options={{ headerShown: false }} />
38+
<Stack.Screen name='register' component={Register} options={{ headerShown: false }} />
39+
<Stack.Screen name='profile' component={Profile} options={{ headerTitle: 'My Profile' }} />
40+
<Stack.Screen name='address' component={Address} options={{ headerTitle: 'My Addresses' }} />
41+
<Stack.Screen name='orders' component={Orders} options={{ headerTitle: 'My Orders' }} />
42+
<Stack.Screen name='cart' component={Cart} options={{ headerTitle: 'My Cart' }} />
43+
<Stack.Screen name='products' component={Products} options={{ headerTitle: 'Products' }} />
44+
<Stack.Screen name='verify' component={Verify} options={{ headerShown: false }} />
45+
<Stack.Screen name='changepassword' component={ChangePassword} options={{ headerShown: false }} />
46+
<Stack.Screen name='forgetpassword' component={ForgetPassword} options={{ headerShown: false }} />
47+
<Stack.Screen name='resetpassword' component={ResetPassword} options={{ headerShown: false }} />
48+
</Stack.Navigator>
49+
</NavigationContainer>
50+
)
51+
}
52+
53+
export default Main

QuickPick/app.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"expo": {
3+
"name": "quickpick",
4+
"slug": "quickpick",
5+
"version": "1.0.0",
6+
"orientation": "portrait",
7+
"icon": "./assets/icon.png",
8+
"userInterfaceStyle": "light",
9+
"splash": {
10+
"image": "./assets/splash.png",
11+
"resizeMode": "contain",
12+
"backgroundColor": "#ffffff"
13+
},
14+
"assetBundlePatterns": [
15+
"**/*"
16+
],
17+
"ios": {
18+
"supportsTablet": true
19+
},
20+
"android": {
21+
"package": "com.ayush.quickpick",
22+
"versionCode": 1,
23+
"adaptiveIcon": {
24+
"foregroundImage": "./assets/adaptive-icon.png",
25+
"backgroundColor": "#ffffff"
26+
}
27+
},
28+
"web": {
29+
"favicon": "./assets/favicon.png"
30+
},
31+
"extra": {
32+
"eas": {
33+
"projectId": "294f9d8d-9ec1-47ad-a2ea-ebae1c03250b"
34+
}
35+
}
36+
}
37+
}

QuickPick/assets/adaptive-icon.png

17.1 KB
Loading

QuickPick/assets/favicon.png

1.43 KB
Loading

QuickPick/assets/icon.png

21.9 KB
Loading

QuickPick/assets/splash.png

46.2 KB
Loading

QuickPick/babel.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = function(api) {
2+
api.cache(true);
3+
return {
4+
presets: ['babel-preset-expo'],
5+
};
6+
};

0 commit comments

Comments
 (0)