Fakultas Ilmu Komputer UI

Commit 07b62656 authored by Bagus Prabowo's avatar Bagus Prabowo
Browse files

Merge branch 'profile-screen' into 'dev'

feat: added profile screen

See merge request !37
parents d4b61d88 9c37b600
This diff is collapsed.
import { useNavigation } from "@react-navigation/core";
import * as React from "react";
import { Button, StyleSheet } from "react-native";
import { useState } from "react";
import { StyleSheet, Image } from "react-native";
import { TouchableOpacity } from "react-native-gesture-handler";
import { Text, View } from "../../components/Themed";
import Colors from "../../constants/Colors";
import { RootTabScreenProps } from "../../types/navigation";
import SmallButton from "../../components/button/SmallButton";
import { Avatar, Title, Caption } from "react-native-paper";
import { MaterialIcons } from "@expo/vector-icons";
import Spacer from "../../components/Spacer/Spacer";
export default function ProfileScreen({
navigation,
}: RootTabScreenProps<"Profile">) {
const nav = useNavigation();
const [name, setName] = useState("Test User");
// const [image, setImage] = useState("");
return (
<View style={styles.container}>
{/* <TouchableOpacity onPress={() => nav.navigate("ChangePassword")}>
<Text>Ganti Password</Text>
</TouchableOpacity> */}
<Button
onPress={() => nav.navigate("AccountSettings")}
title="Pengaturan Akun"
/>
<View style={styles.imageWrapper}>
<Image
style={styles.image}
source={require("../../../assets/images/defaultProfilePic.png")}
/>
<View style={styles.textWrapper}>
<Title style={styles.userName}>{name}</Title>
<Spacer variant={"xl"} />
<SmallButton
onPress={() => nav.navigate("AccountSettings")}
text="Pengaturan Akun"
colors="primary"
/>
</View>
</View>
<Spacer variant={"xl"} />
<View style={styles.imageWrapper}>
<MaterialIcons name={"business"} size={30} />
<View style={styles.textWrapper}>
<Text style={styles.textBisnisSetting}>Pengaturan Bisnis</Text>
</View>
</View>
<Spacer variant={"xl"} />
<View style={styles.imageWrapper}>
<MaterialIcons name={"exit-to-app"} style={styles.iconExit} size={30} />
<View style={styles.textWrapper}>
<Text style={styles.textExit}>Keluar</Text>
</View>
</View>
</View>
);
}
......@@ -28,16 +57,37 @@ const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: "center",
justifyContent: "center",
backgroundColor: Colors.background,
padding: 24,
},
title: {
fontSize: 20,
fontWeight: "bold",
imageWrapper: {
width: "100%",
flexDirection: "row",
},
separator: {
marginVertical: 30,
height: 1,
width: "80%",
image: {
width: 100,
height: 100,
borderRadius: 100,
overflow: "hidden",
},
textWrapper: {
width: "100%",
paddingLeft: 24,
marginTop: 4,
},
userName: {
fontSize: 24,
color: Colors.text.title,
},
textBisnisSetting: {
color: Colors.text.title,
fontSize: 16,
},
textExit: {
color: "#BE321E",
fontSize: 16,
},
iconExit: {
color: "#BE321E",
},
});
......@@ -1155,6 +1155,14 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
"@callstack/react-theme-provider@^3.0.6":
version "3.0.6"
resolved "https://registry.yarnpkg.com/@callstack/react-theme-provider/-/react-theme-provider-3.0.6.tgz#7dac483037e27e28676bdf1431ba87b88f21118f"
integrity sha512-wwKMXfmklfogpalNZT0W+jh76BIquiYUiQHOaPmt/PCyCEP/E6rP+e7Uie6mBZrfkea9WJYJ+mus6r+45JAEhg==
dependencies:
deepmerge "^3.2.0"
hoist-non-react-statics "^3.3.0"
"@cnakazawa/watch@^1.0.3":
version "1.0.4"
resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.4.tgz"
......@@ -2844,6 +2852,21 @@
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.4.tgz"
integrity sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ==
"@types/react-native-vector-icons@^6.4.6":
version "6.4.8"
resolved "https://registry.yarnpkg.com/@types/react-native-vector-icons/-/react-native-vector-icons-6.4.8.tgz#7dd9740f36a71e98c484b9ea12155940c85cedc2"
integrity sha512-ImqhwVPHtcWrfwaS4vVrnN/C1mY50+Gjer4wMltUJlkt9pTJ5WXCyn8VFPmxC5h8Zy0DBN2tYdusBZ2xJP14OA==
dependencies:
"@types/react" "*"
"@types/react-native" "*"
"@types/react-native@*":
version "0.65.1"
resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.65.1.tgz#7342158e10ea5088c225bb669dd4ef15aad0a2f7"
integrity sha512-pyRmTnvjYORIXuL8+ZhoI8gqamTE/8Lo9bU/1Ife3VOTgeFzY9rHnx3Tna7OOixBW5Exh2PcHSkJXma4FENC0g==
dependencies:
"@types/react" "*"
"@types/react-native@~0.63.2":
version "0.63.53"
resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.63.53.tgz"
......@@ -4040,7 +4063,7 @@ color-support@^1.1.3:
resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz"
integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==
color@^3.1.3:
color@^3.1.2, color@^3.1.3:
version "3.2.1"
resolved "https://registry.yarnpkg.com/color/-/color-3.2.1.tgz"
integrity sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==
......@@ -5760,9 +5783,9 @@ hermes-profile-transformer@^0.0.6:
dependencies:
source-map "^0.7.3"
hoist-non-react-statics@^3.3.0:
hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2:
version "3.3.2"
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz"
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45"
integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==
dependencies:
react-is "^16.7.0"
......@@ -8470,6 +8493,11 @@ open@^6.2.0:
dependencies:
is-wsl "^1.1.0"
opencollective-postinstall@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz#7a0fff978f6dbfa4d006238fbac98ed4198c3259"
integrity sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==
optionator@^0.8.1:
version "0.8.3"
resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz"
......@@ -9062,6 +9090,20 @@ react-native-dropdown-picker@^5.1.27:
resolved "https://registry.yarnpkg.com/react-native-dropdown-picker/-/react-native-dropdown-picker-5.1.27.tgz#f7f328d2b695c11d14eadc58de4e38347b809da6"
integrity sha512-lQxn7kiVC+0BSHN4AMOwngR8jUgGMqhbw5vjeuTmlyYbbirfTrXXYqWNlpEs8+XUlAHmPgIkMVZrnQ3e4FIh4w==
react-native-elements@^3.4.2:
version "3.4.2"
resolved "https://registry.yarnpkg.com/react-native-elements/-/react-native-elements-3.4.2.tgz#66602be9c5e0e0a2a831913adec80ff6518d1ee2"
integrity sha512-m0eAWOn7JuR1wNTNY0WHuaqst4LI/gFE4N5Bbyfsc4DiryWsMST7aAg5w/Gos4IexWIzhLKCIkPxthND1m/8Xg==
dependencies:
"@types/react-native-vector-icons" "^6.4.6"
color "^3.1.2"
deepmerge "^4.2.2"
hoist-non-react-statics "^3.3.2"
lodash.isequal "^4.5.0"
opencollective-postinstall "^2.0.3"
react-native-ratings "8.0.4"
react-native-size-matters "^0.3.1"
react-native-gesture-handler@~1.10.2:
version "1.10.3"
resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-1.10.3.tgz"
......@@ -9073,6 +9115,27 @@ react-native-gesture-handler@~1.10.2:
invariant "^2.2.4"
prop-types "^15.7.2"
react-native-iphone-x-helper@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.3.1.tgz#20c603e9a0e765fd6f97396638bdeb0e5a60b010"
integrity sha512-HOf0jzRnq2/aFUcdCJ9w9JGzN3gdEg0zFE4FyYlp4jtidqU03D5X7ZegGKfT1EWteR0gPBGp9ye5T5FvSWi9Yg==
react-native-paper@^4.9.2:
version "4.9.2"
resolved "https://registry.yarnpkg.com/react-native-paper/-/react-native-paper-4.9.2.tgz#6ecdd81acf2cf4d6d5f0247d4c1812dea93eade0"
integrity sha512-J7FRsd0YblQawtuj9I46F//apZHadsCKk6jWpc6njFTYdgUeCdkR8KgEto7cp2WxbcGNELx7KGwPQ4zAgX746A==
dependencies:
"@callstack/react-theme-provider" "^3.0.6"
color "^3.1.2"
react-native-iphone-x-helper "^1.3.1"
react-native-ratings@8.0.4:
version "8.0.4"
resolved "https://registry.yarnpkg.com/react-native-ratings/-/react-native-ratings-8.0.4.tgz#efd5ebad8acc08bf98d34d39b18fb7a6813ef991"
integrity sha512-Xczu5lskIIRD6BEdz9A0jDRpEck/SFxRqiglkXi0u67yAtI1/pcJC76P4MukCbT8K4BPVl+42w83YqXBoBRl7A==
dependencies:
lodash "^4.17.15"
react-native-reanimated@~2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-2.2.0.tgz"
......@@ -9095,6 +9158,11 @@ react-native-screens@~3.4.0:
dependencies:
warn-once "^0.1.0"
react-native-size-matters@^0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/react-native-size-matters/-/react-native-size-matters-0.3.1.tgz#24d0cfc335a2c730f6d58bd7b43ea5a41be4b49f"
integrity sha512-mKOfBLIBFBcs9br1rlZDvxD5+mAl8Gfr5CounwJtxI6Z82rGrMO+Kgl9EIg3RMVf3G855a85YVqHJL2f5EDRlw==
react-native-web@~0.13.12:
version "0.13.18"
resolved "https://registry.yarnpkg.com/react-native-web/-/react-native-web-0.13.18.tgz"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment