fix route

deskripsi:
- perbaiki route tujuan pada create profile
This commit is contained in:
2025-07-08 14:18:50 +08:00
parent 3d9672154c
commit 0698e14d36
4 changed files with 28 additions and 11 deletions

View File

@@ -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 />

View File

@@ -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>
);
}

View File

@@ -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 }}