upd: redesign
Deskripsi: - fitur ganti mode tema - penerapan tema pada semua fitur NO Issues
This commit is contained in:
@@ -4,6 +4,7 @@ import { apiGetBanner, apiGetProfile } from "@/lib/api";
|
||||
import { setEntities } from "@/lib/bannerSlice";
|
||||
import { setEntityUser } from "@/lib/userSlice";
|
||||
import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import { useTheme } from "@/providers/ThemeProvider";
|
||||
import React, { useEffect } from "react";
|
||||
import { Dimensions, Image, View } from "react-native";
|
||||
import { useSharedValue } from "react-native-reanimated";
|
||||
@@ -13,6 +14,7 @@ import Text from "../Text";
|
||||
|
||||
export default function CaraouselHome({ refreshing }: { refreshing: boolean }) {
|
||||
const { decryptToken, token } = useAuthSession()
|
||||
const { colors } = useTheme();
|
||||
const ref = React.useRef<ICarouselInstance>(null);
|
||||
const width = Dimensions.get("window").width;
|
||||
const progress = useSharedValue<number>(0);
|
||||
@@ -66,12 +68,12 @@ export default function CaraouselHome({ refreshing }: { refreshing: boolean }) {
|
||||
renderItem={({ index }) => (
|
||||
<Image
|
||||
source={{ uri: `${ConstEnv.url_storage}/files/${entities[index].image}` }}
|
||||
style={[Styles.caraoselContent]}
|
||||
style={[Styles.caraoselContent, { backgroundColor: colors.primary }]}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
:
|
||||
<View style={[Styles.caraoselContent, { height: width / 2.5 }]}>
|
||||
<View style={[Styles.caraoselContent, { height: width / 2.5, backgroundColor: colors.primary }]}>
|
||||
<Text style={[Styles.textDefault, Styles.cWhite, { textAlign: 'center' }]}>BANNER</Text>
|
||||
</View>
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Styles from "@/constants/Styles";
|
||||
import { apiGetDataHome } from "@/lib/api";
|
||||
import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import { useTheme } from "@/providers/ThemeProvider";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Dimensions, View } from "react-native";
|
||||
import { BarChart } from "react-native-gifted-charts";
|
||||
@@ -16,6 +17,7 @@ type Props = {
|
||||
export default function ChartDokumenHome({ refreshing }: { refreshing: boolean }) {
|
||||
const [loading, setLoading] = useState(true)
|
||||
const { decryptToken, token } = useAuthSession()
|
||||
const { colors } = useTheme();
|
||||
const [data, setData] = useState<Props>([])
|
||||
const [maxValue, setMaxValue] = useState(5)
|
||||
const barData = [
|
||||
@@ -56,7 +58,7 @@ export default function ChartDokumenHome({ refreshing }: { refreshing: boolean }
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<View style={[Styles.wrapPaper, Styles.contentItemCenter, Styles.mb15]}>
|
||||
<View style={[Styles.wrapPaper, Styles.contentItemCenter, Styles.mb15, { backgroundColor: colors.card, borderColor: colors.icon + '20' }]}>
|
||||
<Text style={[Styles.textSubtitle, Styles.mv15]}>JUMLAH DOKUMEN</Text>
|
||||
{
|
||||
loading ? <Skeleton width={100} height={200} borderRadius={10} widthType="percent" />
|
||||
@@ -70,6 +72,8 @@ export default function ChartDokumenHome({ refreshing }: { refreshing: boolean }
|
||||
isAnimated
|
||||
width={width - 140}
|
||||
barWidth={width * 0.25}
|
||||
yAxisTextStyle={{ color: colors.text }}
|
||||
xAxisLabelTextStyle={{ color: colors.text }}
|
||||
renderTooltip={(item: any, index: any) => {
|
||||
return (
|
||||
<View
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Styles from "@/constants/Styles";
|
||||
import { apiGetDataHome } from "@/lib/api";
|
||||
import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import { useTheme } from "@/providers/ThemeProvider";
|
||||
import { useEffect, useState } from "react";
|
||||
import { View } from "react-native";
|
||||
import { PieChart } from "react-native-gifted-charts";
|
||||
@@ -15,6 +16,7 @@ type Props = {
|
||||
|
||||
export default function ChartProgresHome({ refreshing }: { refreshing: boolean }) {
|
||||
const { decryptToken, token } = useAuthSession()
|
||||
const { colors } = useTheme();
|
||||
const [data, setData] = useState<Props>([])
|
||||
const [loading, setLoading] = useState(true)
|
||||
|
||||
@@ -46,7 +48,7 @@ export default function ChartProgresHome({ refreshing }: { refreshing: boolean }
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<View style={[Styles.wrapPaper, Styles.contentItemCenter, Styles.mb15]}>
|
||||
<View style={[Styles.wrapPaper, Styles.contentItemCenter, Styles.mb15, { backgroundColor: colors.card, borderColor: colors.icon + '20' }]}>
|
||||
<Text style={[Styles.textSubtitle, Styles.mv15]}>PROGRES KEGIATAN</Text>
|
||||
{
|
||||
loading ? <Skeleton width={100} height={200} borderRadius={10} widthType="percent" />
|
||||
@@ -56,7 +58,7 @@ export default function ChartProgresHome({ refreshing }: { refreshing: boolean }
|
||||
data={data}
|
||||
showText
|
||||
showValuesAsTooltipText
|
||||
textColor="black"
|
||||
textColor={colors.text}
|
||||
radius={120}
|
||||
textSize={15}
|
||||
focusOnPress={false}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Styles from "@/constants/Styles";
|
||||
import { apiGetDataHome } from "@/lib/api";
|
||||
import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import { useTheme } from "@/providers/ThemeProvider";
|
||||
import { Feather } from "@expo/vector-icons";
|
||||
import { router } from "expo-router";
|
||||
import React, { useEffect, useState } from "react";
|
||||
@@ -17,6 +18,7 @@ type Props = {
|
||||
|
||||
export default function DivisionHome({ refreshing }: { refreshing: boolean }) {
|
||||
const { decryptToken, token } = useAuthSession()
|
||||
const { colors } = useTheme();
|
||||
const ref = React.useRef<ICarouselInstance>(null)
|
||||
const width = Dimensions.get("window").width
|
||||
const [data, setData] = useState<Props[]>([])
|
||||
@@ -58,13 +60,13 @@ export default function DivisionHome({ refreshing }: { refreshing: boolean }) {
|
||||
:
|
||||
data.length > 0 ?
|
||||
data.map((item, index) => (
|
||||
<Pressable style={[Styles.wrapPaper, Styles.mb05,]} key={index} onPress={() => { router.push(`/division/${item.id}`) }}>
|
||||
<Pressable style={[Styles.wrapPaper, Styles.mb05, { backgroundColor: colors.card, borderColor: colors.icon + '20' }]} key={index} onPress={() => { router.push(`/division/${item.id}`) }}>
|
||||
<View style={[Styles.rowSpaceBetween, { alignItems: 'center' }]}>
|
||||
<View>
|
||||
<Text style={[Styles.textDefaultSemiBold]}>{item.name}</Text>
|
||||
<Text style={[Styles.textDefault]}>{item.jumlah} Kegiatan</Text>
|
||||
</View>
|
||||
<Feather name="chevron-right" size={20} color="black" />
|
||||
<Feather name="chevron-right" size={20} color={colors.text} />
|
||||
</View>
|
||||
</Pressable>
|
||||
))
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Styles from "@/constants/Styles";
|
||||
import { apiGetDataHome } from "@/lib/api";
|
||||
import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import { useTheme } from "@/providers/ThemeProvider";
|
||||
import { router } from "expo-router";
|
||||
import { useEffect, useState } from "react";
|
||||
import { View } from "react-native";
|
||||
@@ -24,6 +25,7 @@ type Props = {
|
||||
|
||||
export default function EventHome({ refreshing }: { refreshing: boolean }) {
|
||||
const { decryptToken, token } = useAuthSession()
|
||||
const { colors } = useTheme();
|
||||
const [data, setData] = useState<Props[]>([])
|
||||
const [loading, setLoading] = useState(true)
|
||||
|
||||
@@ -52,7 +54,7 @@ export default function EventHome({ refreshing }: { refreshing: boolean }) {
|
||||
return (
|
||||
<View style={[Styles.mb15]}>
|
||||
<Text style={[Styles.textDefaultSemiBold, Styles.mv10]}>Acara Hari Ini</Text>
|
||||
<View style={[Styles.wrapPaper]}>
|
||||
<View style={[Styles.wrapPaper, { backgroundColor: colors.card, borderColor: colors.icon + '20' }]}>
|
||||
|
||||
{
|
||||
loading ?
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
import Styles from "@/constants/Styles"
|
||||
import { useTheme } from "@/providers/ThemeProvider"
|
||||
import { AntDesign, MaterialCommunityIcons, MaterialIcons } from "@expo/vector-icons"
|
||||
import { router } from "expo-router"
|
||||
import React from "react"
|
||||
import { View } from "react-native"
|
||||
import { ButtonFiturMenu } from "../buttonFiturMenu"
|
||||
import { router } from "expo-router"
|
||||
import Text from "../Text"
|
||||
|
||||
export default function FiturHome() {
|
||||
const { colors } = useTheme();
|
||||
return (
|
||||
<View style={[Styles.mb15]}>
|
||||
<Text style={[Styles.textDefaultSemiBold, Styles.mv10]}>Fitur</Text>
|
||||
|
||||
Reference in New Issue
Block a user