upd: scroll load

Deskripsi:
- list anggota
- list diskusi umum
- list pengumuman

No Issues
This commit is contained in:
amel
2025-06-11 17:18:21 +08:00
parent e4dd649e08
commit 6479069f17
8 changed files with 376 additions and 208 deletions

View File

@@ -13,7 +13,6 @@ import { apiDeleteGroup, apiEditGroup, apiGetGroup } from "@/lib/api";
import { setUpdateGroup } from "@/lib/groupSlice";
import { useAuthSession } from "@/providers/AuthProvider";
import { AntDesign, Feather, MaterialCommunityIcons } from "@expo/vector-icons";
import { useLocalSearchParams } from "expo-router";
import { useEffect, useState } from "react";
import { SafeAreaView, ScrollView, Text, ToastAndroid, View } from "react-native";
import { useDispatch, useSelector } from "react-redux";
@@ -26,7 +25,6 @@ type Props = {
export default function Index() {
const { token, decryptToken } = useAuthSession()
const { active } = useLocalSearchParams<{ active?: string }>()
const [isModal, setModal] = useState(false)
const [isVisibleEdit, setVisibleEdit] = useState(false)
const [data, setData] = useState<Props[]>([])
@@ -42,6 +40,14 @@ export default function Index() {
const dispatch = useDispatch()
const update = useSelector((state: any) => state.groupUpdate)
const [data11, setData1] = useState(Array.from({ length: 20 }, (_, i) => `Item ${i}`));
const renderItem = ({ item }: { item: string }) => (
<View style={{ padding: 20, borderBottomWidth: 1, borderColor: '#ccc' }}>
<Text>{item}</Text>
</View>
);
async function handleEdit() {
try {