diff --git a/package.json b/package.json index ac68913..e0ab77f 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ }, "dependencies": { "@react-native-community/checkbox": "^0.5.8", + "@react-navigation/bottom-tabs": "^6.0.9", "@react-navigation/native": "^6.0.2", "@react-navigation/native-stack": "^6.1.0", "@react-navigation/stack": "^6.0.7", diff --git a/src/assets/home.png b/src/assets/home.png new file mode 100644 index 0000000..a86d1ac Binary files /dev/null and b/src/assets/home.png differ diff --git a/src/assets/homeicon.png b/src/assets/homeicon.png new file mode 100644 index 0000000..cabd5d2 Binary files /dev/null and b/src/assets/homeicon.png differ diff --git a/src/assets/percent.png b/src/assets/percent.png new file mode 100644 index 0000000..2cf00cc Binary files /dev/null and b/src/assets/percent.png differ diff --git a/src/assets/prachit.png b/src/assets/prachit.png new file mode 100644 index 0000000..cf459dc Binary files /dev/null and b/src/assets/prachit.png differ diff --git a/src/assets/profile.png b/src/assets/profile.png new file mode 100644 index 0000000..73716a8 Binary files /dev/null and b/src/assets/profile.png differ diff --git a/src/assets/profileicon.png b/src/assets/profileicon.png new file mode 100644 index 0000000..1c96589 Binary files /dev/null and b/src/assets/profileicon.png differ diff --git a/src/components/background/Background.tsx b/src/components/background/Background.tsx index 0bb94f4..0672e16 100644 --- a/src/components/background/Background.tsx +++ b/src/components/background/Background.tsx @@ -1,6 +1,7 @@ import { StatusBar } from "expo-status-bar"; import React, { ReactElement, ReactNode } from "react"; import { SafeAreaView, StyleSheet } from "react-native"; +import { ScrollView } from "react-native-gesture-handler"; type background = { children: ReactNode; diff --git a/src/config/Navigator.tsx b/src/config/Navigator.tsx index cd42ed1..a7ad18f 100644 --- a/src/config/Navigator.tsx +++ b/src/config/Navigator.tsx @@ -2,6 +2,7 @@ import React, { ReactElement } from "react"; import { NavigationContainer } from "@react-navigation/native"; import { createStackNavigator } from "@react-navigation/stack"; import { + Home, Getstarted, Language, Register, @@ -10,32 +11,38 @@ import { PoliceDetail, DetailFilled, CitizenSignin, - CitizenSignup + CitizenSignup, + Profile } from "@screens"; + import { StackNavigatorParams } from "@types"; const Stack = createStackNavigator(); export default function Navigator(): ReactElement { return ( - - - - - - - - - - - - - + <> + + + + + + + + + + + + + + + + ); } diff --git a/src/config/index.ts b/src/config/index.ts index 0d2e533..5e83d0d 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -1 +1,2 @@ export { default as Navigator } from "./navigator"; +export { default as Tab } from "./tabnavigator/Tab"; diff --git a/src/config/tabnavigator/Tab.tsx b/src/config/tabnavigator/Tab.tsx new file mode 100644 index 0000000..23c9464 --- /dev/null +++ b/src/config/tabnavigator/Tab.tsx @@ -0,0 +1,88 @@ +import { createBottomTabNavigator } from "@react-navigation/bottom-tabs"; +import React from "react"; +import { Home, Profile } from "@screens"; +import { View, Image, TouchableOpacity } from "react-native"; +import { Text } from "@components"; + +const Tab = createBottomTabNavigator(); + +const Tabs = () => { + return ( + + ( + + + + HOME + + + ) + }} + /> + ( + + + + PROFILE + + + ) + }} + /> + + ); +}; +export default Tabs; diff --git a/src/index.tsx b/src/index.tsx index ec0db47..29bfef9 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,10 +1,22 @@ import React, { ReactElement } from "react"; import { AppBootstrap } from "@components"; import Navigator from "@config/Navigator"; +import Tabs from "@config/tabnavigator/Tab"; +import { NavigationContainer } from "@react-navigation/native"; +import { useState } from "react"; export default function App(): ReactElement { + const [login, setLogin] = useState(true); + return ( + {/* {login ? ( + + + + ) : ( + + )} */} ); diff --git a/src/screens/homescreen/Home.tsx b/src/screens/homescreen/Home.tsx new file mode 100644 index 0000000..928cf52 --- /dev/null +++ b/src/screens/homescreen/Home.tsx @@ -0,0 +1,32 @@ +import React from "react"; +import { View, Image } from "react-native"; +import { Background, Text } from "@components"; +import { StyleSheet } from "react-native"; +import { LanguageNavigationProps } from "@types"; + +export function Home({ navigation }: LanguageNavigationProps<"Home">) { + return ( + + + navigation.navigate("Profile")}> + {" "} + Complaints + + + + + ); +} + +const styles = StyleSheet.create({ + view: { + alignItems: "center", + justifyContent: "center", + height: "100%" + }, + text: { + color: "#fff", + + marginBottom: 60 + } +}); diff --git a/src/screens/index.ts b/src/screens/index.ts index 072b739..2bd48e4 100644 --- a/src/screens/index.ts +++ b/src/screens/index.ts @@ -1,4 +1,4 @@ -export { Getstarted } from "./home/Getstarted"; +export { Getstarted } from "./splashscreen/Getstarted"; export { Language } from "./language/Language"; export { default as Register } from "./register/Register"; export { PoliceSignin } from "./register/police/signin/PoliceSignin"; @@ -7,3 +7,5 @@ export { CitizenSignin } from "./register/citizen/signin/CitizenSignin"; export { CitizenSignup } from "./register/citizen/signup/CitizenSignup"; export { PoliceDetail } from "./register/police/detail/PoliceDetail"; export { DetailFilled } from "./register/police/detailfilled/DetailFilled"; +export { Home } from "./homescreen/Home"; +export { Profile } from "./profile/Profile"; diff --git a/src/screens/profile/Profile.tsx b/src/screens/profile/Profile.tsx new file mode 100644 index 0000000..ee483c6 --- /dev/null +++ b/src/screens/profile/Profile.tsx @@ -0,0 +1,121 @@ +import React from "react"; +import { Background, Text } from "@components"; +import { Image, View } from "react-native"; +import { StyleSheet } from "react-native"; + +export function Profile() { + return ( + + + + + + prachit bipin gharat + + + + citizen + + + + 90% + + + + + + Edit Profile + + + Complaints + + + Setting + + + Help + + + Logout + + + + + ); +} +const styles = StyleSheet.create({ + view: { + display: "flex", + justifyContent: "center", + alignItems: "center", + height: "100%" + }, + img: { + height: 170, + width: 170, + borderRadius: 95, + marginBottom: 30 + }, + // protext: { + // color: "#FFF", + // textAlign: "center", + // backgroundColor: "#1D0ECC", + // height: 50, + // width: 320, + // borderTopLeftRadius: 10, + // borderTopRightRadius: 10, + + // paddingVertical: 9 + // }, + text: { + color: "#FFF", + textAlign: "center", + backgroundColor: "#1D0ECC", + height: 50, + width: 320, + borderRadius: 10, + marginVertical: 10, + paddingVertical: 9 + } +}); diff --git a/src/screens/register/police/signin/signin.styles.ts b/src/screens/register/police/signin/signin.styles.ts index b37b69a..cf9b40c 100644 --- a/src/screens/register/police/signin/signin.styles.ts +++ b/src/screens/register/police/signin/signin.styles.ts @@ -12,7 +12,8 @@ const styles = StyleSheet.create({ display: "flex", justifyContent: "center", alignItems: "center", - height: "50%" + paddingTop: 45, + paddingBottom: 20 }, text: { backgroundColor: "#FFF", @@ -30,9 +31,10 @@ const styles = StyleSheet.create({ justifyContent: "center", alignItems: "center", backgroundColor: "#1D0ECC", - height: "55%", + paddingBottom: 250, + paddingTop: 30, width: "100%", - + marginVertical: 15, borderTopLeftRadius: 60, borderTopRightRadius: 60 }, diff --git a/src/screens/home/Getstarted.tsx b/src/screens/splashscreen/Getstarted.tsx similarity index 100% rename from src/screens/home/Getstarted.tsx rename to src/screens/splashscreen/Getstarted.tsx diff --git a/src/screens/home/home.styles.ts b/src/screens/splashscreen/home.styles.ts similarity index 100% rename from src/screens/home/home.styles.ts rename to src/screens/splashscreen/home.styles.ts diff --git a/src/types/navigationTypes/navigationTypes.tsx b/src/types/navigationTypes/navigationTypes.tsx index 4fb7230..30605ae 100644 --- a/src/types/navigationTypes/navigationTypes.tsx +++ b/src/types/navigationTypes/navigationTypes.tsx @@ -2,6 +2,7 @@ import { RouteProp } from "@react-navigation/core"; import { StackNavigationProp } from "@react-navigation/stack"; export type StackNavigatorParams = { + Home: undefined; Getstarted: undefined; Language: undefined; Register: undefined; @@ -11,6 +12,7 @@ export type StackNavigatorParams = { DetailFilled: undefined; CitizenSignin: undefined; CitizenSignup: undefined; + Profile: undefined; }; export type LanguageNavigationProps = { diff --git a/yarn.lock b/yarn.lock index cfe8ce0..706c1fc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1722,6 +1722,15 @@ sudo-prompt "^9.0.0" wcwidth "^1.0.1" +"@react-navigation/bottom-tabs@^6.0.9": + version "6.0.9" + resolved "https://registry.yarnpkg.com/@react-navigation/bottom-tabs/-/bottom-tabs-6.0.9.tgz#916b6a4b495ea8fdcace98dab727064876875d09" + integrity sha512-uRoq6Zd7lPNnLqNQkKC28eR62tpqcDeuakZU1sO8N46FtvrcTuNLoIlssrGty3GF7ALBIxCypn4A93t3nbmMrQ== + dependencies: + "@react-navigation/elements" "^1.2.1" + color "^3.1.3" + warn-once "^0.1.0" + "@react-navigation/core@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-6.0.1.tgz#4424ee1f83e2e305ef80d27c2778fb82fba852a0" @@ -1738,6 +1747,11 @@ resolved "https://registry.yarnpkg.com/@react-navigation/elements/-/elements-1.1.0.tgz#483155ccf5a8f18d015db283bed34cc2255e2e9e" integrity sha512-jZncciZPGuoP6B6f+Wpf6MYSSYy86B2HJDbFTCtT5xZV0w6V9GgCeqvSTOEAxifZrmKl8uDxsr0GrIxgQE8NxA== +"@react-navigation/elements@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@react-navigation/elements/-/elements-1.2.1.tgz#86f19781c6f34a5c9dd25dca99915e0306f477d1" + integrity sha512-EnmAbKMsptrliRKf95rdgS6BhMjML+mIns06+G1Vdih6BrEo7/0iytThUv3WBf99AI76dyEq/cqLUwHPiFzXWg== + "@react-navigation/native-stack@^6.1.0": version "6.1.0" resolved "https://registry.yarnpkg.com/@react-navigation/native-stack/-/native-stack-6.1.0.tgz#32e50d07bc8d9669d65f72dc4ffec2a6cc9ef379"