diff --git a/app/(application)/(user)/collaboration/create.tsx b/app/(application)/(user)/collaboration/create.tsx index 06736ee..155dea7 100644 --- a/app/(application)/(user)/collaboration/create.tsx +++ b/app/(application)/(user)/collaboration/create.tsx @@ -155,7 +155,7 @@ export default function CollaborationCreate() { { setSelectedDate(date as any); }} @@ -254,7 +255,6 @@ export default function EventEdit() { placeholder="Masukkan deskripsi event" required showCount - maxLength={100} value={data?.deskripsi} onChangeText={(value) => setData({ ...data, deskripsi: value })} /> diff --git a/app/(application)/(user)/event/create.tsx b/app/(application)/(user)/event/create.tsx index f80831a..1d3e4dd 100644 --- a/app/(application)/(user)/event/create.tsx +++ b/app/(application)/(user)/event/create.tsx @@ -110,13 +110,14 @@ export default function EventCreate() { const response = await apiEventCreate(newData); console.log("Response", JSON.stringify(response, null, 2)); - router.navigate("/event/status"); + router.replace("/event/status"); } catch (error) { console.log(error); } finally { setIsLoading(false); } }; + const buttonSubmit = ( setData({ ...data, deskripsi: value }) } diff --git a/app/(application)/(user)/profile/[id]/blocked-list.tsx b/app/(application)/(user)/profile/[id]/blocked-list.tsx index 2582ebd..b1c0658 100644 --- a/app/(application)/(user)/profile/[id]/blocked-list.tsx +++ b/app/(application)/(user)/profile/[id]/blocked-list.tsx @@ -121,7 +121,7 @@ export default function ProfileBlockedList() { return ( <> { - const response = await apiGetPortofolio({ id: id }); - const lastTwoByDate = response.data - .sort( - (a: any, b: any) => - new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime() - ) // urut desc - .slice(0, 2); - setListPortofolio(lastTwoByDate); + try { + const response = await apiGetPortofolio({ id: id }); + const lastTwoByDate = response.data + .sort( + (a: any, b: any) => + new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime() + ) // urut desc + .slice(0, 2); + setListPortofolio(lastTwoByDate); + } catch (error) { + console.log("[ERROR]", error); + } }; return ( diff --git a/app/(application)/(user)/voting/[id]/[status]/detail.tsx b/app/(application)/(user)/voting/[id]/[status]/detail.tsx index 76ef4c8..69c5f21 100644 --- a/app/(application)/(user)/voting/[id]/[status]/detail.tsx +++ b/app/(application)/(user)/voting/[id]/[status]/detail.tsx @@ -134,7 +134,7 @@ export default function VotingDetailStatus() { {data && data?.catatan && - (status === "draft" || status === "rejected") && ( + (status === "draft" || status === "reject") && ( )} diff --git a/components/Button/FloatingButton.tsx b/components/Button/FloatingButton.tsx index 646a0ca..d63f189 100644 --- a/components/Button/FloatingButton.tsx +++ b/components/Button/FloatingButton.tsx @@ -32,9 +32,10 @@ const FloatingButton: React.FC = ({ const styles = StyleSheet.create({ fab: { position: "absolute", - margin: 16, + margin: "auto", right: 0, - bottom: 0, + // bottom: 10, + top: -20, backgroundColor: AccentColor.softblue, // Warna Twitter biru borderRadius: 50, borderColor: AccentColor.blue, diff --git a/components/TextArea/TextAreaCustom.tsx b/components/TextArea/TextAreaCustom.tsx index 848e8cb..1487e14 100644 --- a/components/TextArea/TextAreaCustom.tsx +++ b/components/TextArea/TextAreaCustom.tsx @@ -1,3 +1,4 @@ +import { AccentColor, MainColor } from "@/constants/color-palet"; import { GStyles } from "@/styles/global-styles"; import React, { useEffect, useState } from "react"; import { @@ -6,7 +7,9 @@ import { Text, View, ViewStyle, + useColorScheme, } from "react-native"; +import { PlaceholderColor } from "@/constants/color-palet"; type IconType = React.ReactNode | string; @@ -48,7 +51,7 @@ const TextAreaCustom: React.FC = ({ minRows = 4, maxRows = 6, showCount = false, - maxLength, + maxLength = 1000, value, onChangeText, height = 100, @@ -78,6 +81,9 @@ const TextAreaCustom: React.FC = ({ ); }; + const colorScheme = useColorScheme(); + const theme = PlaceholderColor[colorScheme || "light"]; + return ( {label && ( @@ -109,6 +115,7 @@ const TextAreaCustom: React.FC = ({ GStyles.textAreaInput, { color: fontColor }, ]} + placeholderTextColor={theme.placeholder} editable={!disabled} value={value as string} onChangeText={onChangeText} diff --git a/components/TextInput/TextInputCustom.tsx b/components/TextInput/TextInputCustom.tsx index 3a0fca1..7c7ca4b 100644 --- a/components/TextInput/TextInputCustom.tsx +++ b/components/TextInput/TextInputCustom.tsx @@ -1,3 +1,4 @@ +import { PlaceholderColor } from "@/constants/color-palet"; import { GStyles } from "@/styles/global-styles"; import Ionicons from "@expo/vector-icons/Ionicons"; import React, { useState } from "react"; @@ -8,8 +9,10 @@ import { TouchableOpacity, View, ViewStyle, + useColorScheme } from "react-native"; + type IconType = React.ReactNode | string; type Props = { @@ -74,6 +77,9 @@ const TextInputCustom = ({ } }; + const colorScheme = useColorScheme(); + const theme = PlaceholderColor[colorScheme || "light"]; + return ( {label && ( @@ -100,12 +106,14 @@ const TextInputCustom = ({ { color: fontColor }, disabled && GStyles.inputPlaceholderDisabled, // <-- placeholder saat disabled ]} + placeholderTextColor={theme.placeholder} editable={!disabled} secureTextEntry={secureTextEntry && !isPasswordVisible} keyboardType={keyboardType} onChangeText={handleTextChange} maxLength={maxLength} {...rest} + /> {secureTextEntry && ( , onPress: () => router.push("/(application)/(user)/collaboration/(tabs)"), - status: "inactive", + status: "active", }, { name: "Voting", diff --git a/screens/Portofolio/SocialMediaSection.tsx b/screens/Portofolio/SocialMediaSection.tsx index c4fc141..19aa34b 100644 --- a/screens/Portofolio/SocialMediaSection.tsx +++ b/screens/Portofolio/SocialMediaSection.tsx @@ -5,16 +5,6 @@ import { Ionicons } from "@expo/vector-icons"; export default function Portofolio_SocialMediaSection({ data }: { data: any }) { const listData = [ - { - label: data && data?.facebook ? data.facebook : "-", - icon: ( - - ), - }, { label: data && data?.tiktok ? data.tiktok : "-", icon: ( @@ -35,6 +25,16 @@ export default function Portofolio_SocialMediaSection({ data }: { data: any }) { /> ), }, + { + label: data && data?.facebook ? data.facebook : "-", + icon: ( + + ), + }, { label: data && data?.twitter ? data.twitter : "-", icon: ( diff --git a/screens/Voting/BoxDetailHasilVotingSection.tsx b/screens/Voting/BoxDetailHasilVotingSection.tsx index 790e052..ee11056 100644 --- a/screens/Voting/BoxDetailHasilVotingSection.tsx +++ b/screens/Voting/BoxDetailHasilVotingSection.tsx @@ -22,9 +22,11 @@ export default function Voting_BoxDetailHasilVotingSection({ {listData?.map((item: any, i: number) => ( - + - {item?.value} + {item?.value} ))}