New repo mobile after delete ! #1

Merged
bagasbanuna merged 233 commits from api/24-oct-25 into main 2025-10-27 11:32:16 +08:00
82 changed files with 3775 additions and 325 deletions
Showing only changes of commit 0b1fd05eec - Show all commits

View File

@@ -166,6 +166,22 @@ export default function ApplicationLayout() {
),
}}
/>
{/* Take Picture */}
<Stack.Screen
name="take-picture/[id]/index"
options={{
title: "Ambil Gambar",
headerLeft: () => (
<Ionicons
name="arrow-back"
size={20}
color={MainColor.yellow}
onPress={() => router.back()}
/>
),
}}
/>
</Stack>
</>
);

View File

@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import { BaseBox, ButtonCustom } from "@/components";
import ViewWrapper from "@/components/_ShareComponent/ViewWrapper";
import ButtonUpload from "@/components/Button/ButtonUpload";
@@ -13,7 +12,7 @@ export default function UpdateBackgroundProfile() {
bottomBarComponent={
<ButtonCustom
onPress={() => {
console.log("Simpan foto");
console.log("Simpan foto background >>", id);
router.back();
}}
>
@@ -32,8 +31,9 @@ export default function UpdateBackgroundProfile() {
</BaseBox>
<ButtonUpload
title="Update"
onPress={() =>
router.navigate("/(application)/profile/[id]/take-picture")
router.navigate(`/(application)/take-picture/${id}`)
}
/>
</ViewWrapper>

View File

@@ -12,7 +12,7 @@ export default function UpdatePhotoProfile() {
bottomBarComponent={
<ButtonCustom
onPress={() => {
console.log("Simpan foto");
console.log("Simpan foto profile >>", id);
router.back();
}}
>
@@ -31,9 +31,10 @@ export default function UpdatePhotoProfile() {
</BaseBox>
<ButtonUpload
title="Update"
onPress={() => {
console.log("ID >>", id);
router.navigate("/(application)/profile/[id]/take-picture");
console.log("Update photo >>", id);
router.navigate(`/(application)/take-picture/${id}`);
}}
/>
</ViewWrapper>

View File

@@ -24,14 +24,6 @@ export default function ProfileLayout() {
name="[id]/update-background"
options={{ title: "Update Latar Belakang" }}
/>
<Stack.Screen
name="[id]/take-picture"
options={{ title: "Ambil Foto" }}
/>
<Stack.Screen
name="[id]/take-picture2"
options={{ title: "Ambil Foto 2" }}
/>
</Stack>
</>
);

View File

@@ -9,11 +9,14 @@ import FontAwesome6 from "@expo/vector-icons/FontAwesome6";
import { CameraType, CameraView, useCameraPermissions } from "expo-camera";
import { Image } from "expo-image";
import * as ImagePicker from "expo-image-picker";
import { router } from "expo-router";
import { router, useLocalSearchParams } from "expo-router";
import { useRef, useState } from "react";
import { Pressable, StyleSheet, Text, View } from "react-native";
export default function TakePictureProfile() {
export default function TakePicture() {
const { id } = useLocalSearchParams();
// console.log("Take Picture ID >>", id);
const [permission, requestPermission] = useCameraPermissions();
const ref = useRef<CameraView>(null);
const [uri, setUri] = useState<string | null>(null);
@@ -68,10 +71,10 @@ export default function TakePictureProfile() {
<ButtonCustom onPress={() => setUri(null)} title="Foto ulang" />
<ButtonCustom
onPress={() => {
console.log("Update foto");
console.log("Upload picture >>", id);
router.back();
}}
title="Update Foto"
title="Upload Foto"
/>
</StackCustom>
</View>

View File

@@ -30,8 +30,8 @@ export default function LoginView() {
const id = randomAlfabet + randomNumber + fixNumber;
console.log("user id :", id);
router.navigate("/verification");
// router.navigate(`/(application)/profile/${id}`);
// router.navigate("/verification");
router.navigate(`/(application)/profile/${id}`);
// router.navigate("/(application)/home");
// router.navigate(`/(application)/profile/${id}/edit`);