upd: redesign
Deskripsi: - fitur ganti mode tema - penerapan tema pada semua fitur NO Issues
This commit is contained in:
@@ -3,6 +3,7 @@ import { apiDeleteLinkTask, apiGetTaskOne } from "@/lib/api";
|
||||
import { urlCompleted } from "@/lib/fun_urlCompleted";
|
||||
import { setUpdateTask } from "@/lib/taskUpdate";
|
||||
import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import { useTheme } from "@/providers/ThemeProvider";
|
||||
import { Feather, Ionicons } from "@expo/vector-icons";
|
||||
import { useLocalSearchParams } from "expo-router";
|
||||
import { useEffect, useState } from "react";
|
||||
@@ -21,6 +22,7 @@ type Props = {
|
||||
}
|
||||
|
||||
export default function SectionLinkTask({ refreshing, isMemberDivision }: { refreshing: boolean, isMemberDivision: boolean }) {
|
||||
const { colors } = useTheme()
|
||||
const [isModal, setModal] = useState(false)
|
||||
const { token, decryptToken } = useAuthSession()
|
||||
const { detail } = useLocalSearchParams<{ detail: string }>()
|
||||
@@ -74,14 +76,14 @@ export default function SectionLinkTask({ refreshing, isMemberDivision }: { refr
|
||||
<>
|
||||
<View style={[Styles.mb15]}>
|
||||
<Text style={[Styles.textDefaultSemiBold, Styles.mv05]}>Link</Text>
|
||||
<View style={[Styles.wrapPaper]}>
|
||||
<View style={[Styles.wrapPaper, { backgroundColor: colors.card, borderColor: colors.background }]}>
|
||||
{
|
||||
data.map((item, index) => {
|
||||
return (
|
||||
<BorderBottomItem
|
||||
key={index}
|
||||
borderType="all"
|
||||
icon={<Feather name="link" size={25} color="black" />}
|
||||
icon={<Feather name="link" size={25} color={colors.text} />}
|
||||
title={item.link}
|
||||
titleWeight="normal"
|
||||
onPress={() => { setSelectLink(item); setModal(true) }}
|
||||
@@ -96,7 +98,7 @@ export default function SectionLinkTask({ refreshing, isMemberDivision }: { refr
|
||||
<DrawerBottom animation="slide" isVisible={isModal} setVisible={setModal} title="Menu">
|
||||
<View style={Styles.rowItemsCenter}>
|
||||
<MenuItemRow
|
||||
icon={<Feather name="external-link" color="black" size={25} />}
|
||||
icon={<Feather name="external-link" color={colors.text} size={25} />}
|
||||
title="Buka Link"
|
||||
onPress={() => {
|
||||
Linking.openURL(urlCompleted(String(selectLink?.link)))
|
||||
@@ -106,7 +108,7 @@ export default function SectionLinkTask({ refreshing, isMemberDivision }: { refr
|
||||
(entityUser.role != "user" && entityUser.role != "coadmin") || isMemberDivision
|
||||
?
|
||||
<MenuItemRow
|
||||
icon={<Ionicons name="trash" color="black" size={25} />}
|
||||
icon={<Ionicons name="trash" color={colors.text} size={25} />}
|
||||
title="Hapus"
|
||||
onPress={() => {
|
||||
setModal(false)
|
||||
|
||||
Reference in New Issue
Block a user