fix: home

Deskripsi:
- data kosong pada divisi home
- data kosong pada project home

No Issues
This commit is contained in:
amel
2025-06-16 17:28:15 +08:00
parent c71292d966
commit c5a3a80462
2 changed files with 65 additions and 59 deletions

View File

@@ -46,27 +46,30 @@ export default function DivisionHome() {
{
loading ? <Skeleton width={100} height={150} borderRadius={10} widthType="percent" />
:
<Carousel
ref={ref}
style={{ width: "100%" }}
width={width * 0.8}
height={235}
data={data}
loop={true}
autoPlay={false}
autoPlayReverse={false}
pagingEnabled={true}
snapEnabled={true}
vertical={false}
renderItem={({ index }) => (
<PaperGridContent onPress={() => { router.push(`/division/${data[index].id}`) }} content="carousel" title={data[index].name} headerColor="warning">
<View>
<Text style={{ fontSize: 50, textAlign: "center", fontWeight: 'bold' }}>{data[index].jumlah}</Text>
<Text style={[Styles.textSubtitle, { textAlign: "center" }]}>KEGIATAN</Text>
</View>
</PaperGridContent>
)}
/>
data.length > 0 ?
<Carousel
ref={ref}
style={{ width: "100%" }}
width={width * 0.8}
height={235}
data={data}
loop={true}
autoPlay={false}
autoPlayReverse={false}
pagingEnabled={true}
snapEnabled={true}
vertical={false}
renderItem={({ index }) => (
<PaperGridContent onPress={() => { router.push(`/division/${data[index].id}`) }} content="carousel" title={data[index].name} headerColor="warning">
<View>
<Text style={{ fontSize: 50, textAlign: "center", fontWeight: 'bold' }}>{data[index].jumlah}</Text>
<Text style={[Styles.textSubtitle, { textAlign: "center" }]}>KEGIATAN</Text>
</View>
</PaperGridContent>
)}
/>
:
<Text style={[Styles.textDefault, Styles.cGray, { textAlign: 'center' }]}>Tidak ada data</Text>
}
</View>