diff --git a/app/(application)/announcement/[id].tsx b/app/(application)/announcement/[id].tsx index b1c298d..b9be05b 100644 --- a/app/(application)/announcement/[id].tsx +++ b/app/(application)/announcement/[id].tsx @@ -117,6 +117,7 @@ export default function DetailAnnouncement() { : {data?.desc} diff --git a/app/(application)/banner/[id].tsx b/app/(application)/banner/[id].tsx index 62551ba..e204aca 100644 --- a/app/(application)/banner/[id].tsx +++ b/app/(application)/banner/[id].tsx @@ -154,7 +154,7 @@ export default function EditBanner() { > - Mohon unggah gambar dalam resolusi 1535 x 450 piksel untuk + Mohon unggah gambar dalam resolusi 1650 x 720 pixel untuk memastikan diff --git a/app/(application)/banner/create.tsx b/app/(application)/banner/create.tsx index 94bcec2..c701e66 100644 --- a/app/(application)/banner/create.tsx +++ b/app/(application)/banner/create.tsx @@ -137,7 +137,7 @@ export default function CreateBanner() { > - Mohon unggah gambar dalam resolusi 1535 x 450 pixel untuk + Mohon unggah gambar dalam resolusi 1650 x 720 pixel untuk memastikan diff --git a/app/(application)/discussion/[id].tsx b/app/(application)/discussion/[id].tsx index bd80157..8a16505 100644 --- a/app/(application)/discussion/[id].tsx +++ b/app/(application)/discussion/[id].tsx @@ -222,7 +222,8 @@ export default function DetailDiscussionGeneral() { } - title={data?.title + " " + data?.createdAt} + title={data?.title} + titleShowAll={true} subtitle={ !data?.isActive ? diff --git a/app/(application)/member/[id].tsx b/app/(application)/member/[id].tsx index fbd1776..770e8e9 100644 --- a/app/(application)/member/[id].tsx +++ b/app/(application)/member/[id].tsx @@ -12,6 +12,7 @@ import { apiGetProfile } from "@/lib/api"; import { router, Stack, useLocalSearchParams } from "expo-router"; import { useEffect, useState } from "react"; import { RefreshControl, SafeAreaView, ScrollView, View } from "react-native"; +import Toast from "react-native-toast-message"; import { useSelector } from "react-redux"; type Props = { @@ -42,10 +43,15 @@ export default function MemberDetail() { try { setLoading(loading) const response = await apiGetProfile({ id: id }) - setData(response.data) - setEdit(valueRoleUser.filter((v) => v.login == entityUser.role)[0]?.data.some((i: any) => i.id == response.data.idUserRole)) + if (response.success) { + setData(response.data) + setEdit(valueRoleUser.filter((v) => v.login == entityUser.role)[0]?.data.some((i: any) => i.id == response.data.idUserRole)) + } else { + Toast.show({ type: 'small', text1: response.message }) + } } catch (error) { console.error(error) + Toast.show({ type: 'small', text1: 'Gagal mengambil data' }) } finally { setLoading(false) } @@ -84,7 +90,7 @@ export default function MemberDetail() { /> } > - + { loading ? <> diff --git a/components/borderBottomItem.tsx b/components/borderBottomItem.tsx index 8a9b3fb..1a15925 100644 --- a/components/borderBottomItem.tsx +++ b/components/borderBottomItem.tsx @@ -21,9 +21,10 @@ type Props = { descEllipsize?: boolean textColor?: string, colorPress?: boolean + titleShowAll?: boolean } -export default function BorderBottomItem({ title, subtitle, icon, desc, onPress, onLongPress, rightTopInfo, borderType, leftBottomInfo, rightBottomInfo, titleWeight, bgColor, width, descEllipsize, textColor, colorPress }: Props) { +export default function BorderBottomItem({ title, subtitle, icon, desc, onPress, onLongPress, rightTopInfo, borderType, leftBottomInfo, rightBottomInfo, titleWeight, bgColor, width, descEllipsize, textColor, colorPress, titleShowAll }: Props) { const lebarDim = Dimensions.get("window").width; const lebar = width ? lebarDim * width / 100 : 'auto'; const textColorFix = textColor ? textColor : 'black'; @@ -49,7 +50,7 @@ export default function BorderBottomItem({ title, subtitle, icon, desc, onPress, {icon} - {title} + {title} { subtitle && typeof subtitle == "string" diff --git a/components/discussionItem.tsx b/components/discussionItem.tsx index ce23ded..8a9efdc 100644 --- a/components/discussionItem.tsx +++ b/components/discussionItem.tsx @@ -15,16 +15,16 @@ export default function DiscussionItem({ title, user, date, onPress }: Props) { - + {title} - - + + - {user} + {user} - + {date} diff --git a/constants/Styles.ts b/constants/Styles.ts index 8d69233..4ddf374 100644 --- a/constants/Styles.ts +++ b/constants/Styles.ts @@ -343,7 +343,9 @@ const Styles = StyleSheet.create({ borderRadius: 15, backgroundColor: '#19345E', display: 'flex', - width: '92%' + width: '92%', + resizeMode: 'stretch', + overflow: 'hidden', }, wrapGridContent: { shadowColor: '#171717', @@ -473,6 +475,7 @@ const Styles = StyleSheet.create({ wrapHeadViewMember: { backgroundColor: '#19345E', paddingVertical: 30, + paddingHorizontal: 15, alignItems: 'center', borderBottomLeftRadius: 25, borderBottomRightRadius: 25