fix route
deskripsi: - perbaiki route tujuan pada create profile
This commit is contained in:
@@ -11,10 +11,12 @@ import InformationBox from "@/components/Box/InformationBox";
|
||||
import ButtonUpload from "@/components/Button/ButtonUpload";
|
||||
import LandscapeFrameUploaded from "@/components/Image/LandscapeFrameUploaded";
|
||||
import { GStyles } from "@/styles/global-styles";
|
||||
import { router, useLocalSearchParams } from "expo-router";
|
||||
import { useState } from "react";
|
||||
import { View } from "react-native";
|
||||
|
||||
export default function CreateProfile() {
|
||||
const { id } = useLocalSearchParams();
|
||||
const [data, setData] = useState({
|
||||
name: "",
|
||||
email: "",
|
||||
@@ -24,7 +26,7 @@ export default function CreateProfile() {
|
||||
|
||||
const handlerSave = () => {
|
||||
console.log("data create profile >>", data);
|
||||
// router.back();
|
||||
router.back();
|
||||
};
|
||||
|
||||
const footerComponent = (
|
||||
@@ -32,7 +34,7 @@ export default function CreateProfile() {
|
||||
<View style={GStyles.bottomBarContainer}>
|
||||
<ButtonCustom
|
||||
onPress={handlerSave}
|
||||
disabled={!data.name || !data.email || !data.address || !data.gender}
|
||||
// disabled={!data.name || !data.email || !data.address || !data.gender}
|
||||
>
|
||||
Simpan
|
||||
</ButtonCustom>
|
||||
@@ -47,7 +49,9 @@ export default function CreateProfile() {
|
||||
<View style={{ alignItems: "center" }}>
|
||||
<AvatarCustom size="xl" />
|
||||
<Spacing />
|
||||
<ButtonUpload onPress={() => console.log("pressed")} />
|
||||
<ButtonUpload
|
||||
onPress={() => router.navigate(`/take-picture/${id}`)}
|
||||
/>
|
||||
</View>
|
||||
|
||||
<Spacing />
|
||||
@@ -56,7 +60,9 @@ export default function CreateProfile() {
|
||||
<InformationBox text="Upload foto latar belakang anda." />
|
||||
<LandscapeFrameUploaded />
|
||||
<Spacing />
|
||||
<ButtonUpload onPress={() => console.log("pressed")} />
|
||||
<ButtonUpload
|
||||
onPress={() => router.navigate(`/take-picture/${id}`)}
|
||||
/>
|
||||
</View>
|
||||
|
||||
<Spacing />
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
import { Text, View } from "react-native";
|
||||
import { StackCustom, TextCustom, ViewWrapper } from "@/components";
|
||||
|
||||
export default function NotFoundScreen() {
|
||||
return (
|
||||
<View>
|
||||
<Text>Not Found</Text>
|
||||
</View>
|
||||
)
|
||||
<ViewWrapper>
|
||||
<StackCustom align="center" gap={0} style={{justifyContent: "center", alignItems: "center", flex: 1}}>
|
||||
<TextCustom size="large" bold style={{fontSize: 100}}>
|
||||
404
|
||||
</TextCustom>
|
||||
<TextCustom size="large" bold>
|
||||
Sorry, File Not Found
|
||||
</TextCustom>
|
||||
</StackCustom>
|
||||
</ViewWrapper>
|
||||
);
|
||||
}
|
||||
@@ -15,6 +15,7 @@ export default function RootLayout() {
|
||||
}}
|
||||
>
|
||||
<Stack.Screen name="index" options={{ title: "" }} />
|
||||
<Stack.Screen name="+not-found" options={{ title: "" }} />
|
||||
<Stack.Screen
|
||||
name="verification"
|
||||
options={{ title: "", headerBackVisible: false }}
|
||||
|
||||
@@ -3,7 +3,7 @@ import { BaseBox, Grid, Spacing, TextCustom } from "@/components";
|
||||
import { MainColor } from "@/constants/color-palet";
|
||||
import { ICON_SIZE_SMALL } from "@/constants/constans-value";
|
||||
import { FontAwesome5, Ionicons } from "@expo/vector-icons";
|
||||
import { useLocalSearchParams } from "expo-router";
|
||||
import { router, useLocalSearchParams } from "expo-router";
|
||||
import { View } from "react-native";
|
||||
import AvatarAndBackground from "./AvatarAndBackground";
|
||||
|
||||
@@ -85,7 +85,10 @@ export default function ProfilSection() {
|
||||
<BaseBox
|
||||
key={index}
|
||||
style={{ backgroundColor: MainColor.darkblue }}
|
||||
onPress={() => console.log("pressed")}
|
||||
onPress={() => {
|
||||
console.log("press to Portofolio");
|
||||
router.push(`/portofolio/${id}`);
|
||||
}}
|
||||
>
|
||||
<Grid>
|
||||
<Grid.Col
|
||||
|
||||
Reference in New Issue
Block a user