From a00481152c45014be00bc42ddac0bc68fd9e01bb Mon Sep 17 00:00:00 2001 From: nico Date: Thu, 11 Dec 2025 17:58:03 +0800 Subject: [PATCH] Fix Konsisten teks di tampilan mobile dan desktop Fix QC Kak Inno tgl 10 Des Fix QC Kak Ayu tgl 10 Des --- .../desa/berita/[kategori]/Content.tsx | 100 +++- .../desa/berita/[kategori]/[id]/page.tsx | 66 +-- .../(pages)/desa/berita/semua/page.tsx | 51 +- .../(pages)/desa/galery/foto/Content.tsx | 0 .../(pages)/desa/galery/foto/page.tsx | 67 +-- .../(pages)/desa/galery/video/Content.tsx | 109 +++-- .../(pages)/desa/galery/video/[id]/page.tsx | 40 +- .../_com/pelayananPendudukNonPermanent.tsx | 28 +- .../_com/pelayananPerizinanBerusaha.tsx | 42 +- .../layanan/_com/pelayananSuratKeterangan.tsx | 18 +- .../_com/pelayananTelunjukSaktiDesa.tsx | 17 +- .../desa/pengumuman/[name]/[id]/page.tsx | 88 +++- .../(pages)/desa/pengumuman/[name]/page.tsx | 84 +++- .../(pages)/desa/pengumuman/page.tsx | 67 +-- .../(pages)/desa/potensi/[id]/page.tsx | 36 +- .../darmasaba/(pages)/desa/potensi/page.tsx | 79 ++- .../struktur-perangkat-desa/[id]/page.tsx | 40 +- .../profil/struktur-perangkat-desa/page.tsx | 75 +-- .../(pages)/desa/profil/ui/lambangDesa.tsx | 36 +- .../(pages)/desa/profil/ui/maskotDesa.tsx | 85 ++-- .../(pages)/desa/profil/ui/motoDesa.tsx | 73 ++- .../(pages)/desa/profil/ui/profilPerbekel.tsx | 82 ++-- .../(pages)/desa/profil/ui/sejarahDesa.tsx | 25 +- .../(pages)/desa/profil/ui/semuaPerbekel.tsx | 53 +- .../(pages)/desa/profil/ui/visimisiDesa.tsx | 43 +- .../PADesa-pendapatan-asli-desa/page.tsx | 351 ++++++++------ .../(pages)/ekonomi/pasar-desa/page.tsx | 126 ++--- .../ekonomi/program-kemiskinan/page.tsx | 70 ++- .../page.tsx | 453 ++++++++++++------ .../page.tsx | 2 +- .../keamanan/laporan-publik/[id]/page.tsx | 12 +- .../(pages)/keamanan/tips-keamanan/page.tsx | 123 +++-- .../artikel-kesehatan-page/page.tsx | 7 +- .../fasilitas-kesehatan-page/page.tsx | 34 +- .../kesehatan/data-kesehatan-warga/page.tsx | 77 +-- .../info-wabah-penyakit/[id]/page.tsx | 25 +- .../(pages)/kesehatan/posyandu/[id]/page.tsx | 39 +- .../(pages)/kesehatan/posyandu/page.tsx | 41 +- .../(pages)/ppid/struktur-ppid/page.tsx | 2 +- .../darmasaba/(tambahan)/penghargaan/page.tsx | 32 +- src/app/darmasaba/_com/NavbarMainMenu.tsx | 2 +- .../_com/main-page/potensi/index.tsx | 2 +- src/app/darmasaba/_com/searchUrl.tsx | 16 +- 43 files changed, 1725 insertions(+), 1093 deletions(-) delete mode 100644 src/app/darmasaba/(pages)/desa/galery/foto/Content.tsx diff --git a/src/app/darmasaba/(pages)/desa/berita/[kategori]/Content.tsx b/src/app/darmasaba/(pages)/desa/berita/[kategori]/Content.tsx index 8871dc52..5e0b73e0 100644 --- a/src/app/darmasaba/(pages)/desa/berita/[kategori]/Content.tsx +++ b/src/app/darmasaba/(pages)/desa/berita/[kategori]/Content.tsx @@ -1,5 +1,5 @@ /* eslint-disable react-hooks/exhaustive-deps */ -'use client' +'use client'; import stateDashboardBerita from '@/app/admin/(dashboard)/_state/desa/berita'; import { Badge, @@ -51,10 +51,14 @@ export default function Content({ kategori }: { kategori: string }) { {/* === Berita Utama === */} {featuredState.loading ? ( -
+
+ +
) : featured ? ( - Berita Utama + + Berita Utama + @@ -74,13 +78,29 @@ export default function Content({ kategori }: { kategori: string }) { {featured.kategoriBerita?.name || kategori} - {featured.judul} - + + {featured.judul} + + - + {new Date(featured.createdAt).toLocaleDateString('id-ID', { day: 'numeric', month: 'long', @@ -91,7 +111,9 @@ export default function Content({ kategori }: { kategori: string }) { @@ -105,19 +127,29 @@ export default function Content({ kategori }: { kategori: string }) { {/* === Daftar Berita === */} - Daftar Berita + + Daftar Berita + {state.findMany.loading ? ( - {Array(3).fill(0).map((_, i) => ( - - ))} + {Array(3) + .fill(0) + .map((_, i) => ( + + ))} ) : paginatedNews.length === 0 ? ( - Belum ada berita di kategori "{kategori}". + + Belum ada berita di kategori "{kategori}". + ) : ( - + {paginatedNews.map((item) => ( router.push(`/darmasaba/desa/berita/${kategori}/${item.id}`)} + onClick={() => + router.push(`/darmasaba/desa/berita/${kategori}/${item.id}`) + } style={{ cursor: 'pointer' }} > - {item.judul} + {item.judul} {item.kategoriBerita?.name || kategori} - {item.judul} - + + {item.judul} + + - + {new Date(item.createdAt).toLocaleDateString('id-ID', { day: 'numeric', month: 'short', diff --git a/src/app/darmasaba/(pages)/desa/berita/[kategori]/[id]/page.tsx b/src/app/darmasaba/(pages)/desa/berita/[kategori]/[id]/page.tsx index efcbd850..3da5058a 100644 --- a/src/app/darmasaba/(pages)/desa/berita/[kategori]/[id]/page.tsx +++ b/src/app/darmasaba/(pages)/desa/berita/[kategori]/[id]/page.tsx @@ -3,18 +3,16 @@ import stateDashboardBerita from '@/app/admin/(dashboard)/_state/desa/berita'; import NewsReader from '@/app/darmasaba/_com/NewsReader'; import colors from '@/con/colors'; -import { Box, Center, Container, Group, Image, Skeleton, Stack, Text } from '@mantine/core'; +import { Box, Center, Container, Group, Image, Skeleton, Stack, Text, Title } from '@mantine/core'; import { useParams } from 'next/navigation'; import { useEffect, useState } from 'react'; import { useProxy } from 'valtio/utils'; - - function Page() { const params = useParams<{ id: string }>(); const id = Array.isArray(params.id) ? params.id[0] : params.id; - const state = useProxy(stateDashboardBerita.berita) - const [loading, setLoading] = useState(true) + const state = useProxy(stateDashboardBerita.berita); + const [loading, setLoading] = useState(true); useEffect(() => { const loadData = async () => { @@ -27,9 +25,9 @@ function Page() { } finally { setLoading(false); } - } - loadData() - }, [id]) + }; + loadData(); + }, [id]); if (loading) { return ( @@ -47,41 +45,49 @@ function Page() { ); } - return ( - - + + - + - - {state.findUnique.data?.judul} - - + {state.findUnique.data.judul} + + Informasi dan Pelayanan Administrasi Digital - </Text> + - + - - + + @@ -90,4 +96,4 @@ function Page() { ); } -export default Page; +export default Page; \ No newline at end of file diff --git a/src/app/darmasaba/(pages)/desa/berita/semua/page.tsx b/src/app/darmasaba/(pages)/desa/berita/semua/page.tsx index f37d9a93..50425ff0 100644 --- a/src/app/darmasaba/(pages)/desa/berita/semua/page.tsx +++ b/src/app/darmasaba/(pages)/desa/berita/semua/page.tsx @@ -16,35 +16,30 @@ function Semua() { const searchParams = useSearchParams(); const router = useTransitionRouter(); - // Ambil parameter langsung dari URL const search = searchParams.get('search') || ''; const page = parseInt(searchParams.get('page') || '1'); - // Gunakan proxy untuk state global const state = useProxy(stateDashboardBerita.berita); const featured = useProxy(stateDashboardBerita.berita.findFirst); const loadingGrid = state.findMany.loading; const loadingFeatured = featured.loading; - // Load berita utama sekali saja useEffect(() => { if (!featured.data && !loadingFeatured) { stateDashboardBerita.berita.findFirst.load(); } }, [featured.data, loadingFeatured]); - // Load berita terbaru tiap page / search berubah useEffect(() => { const limit = 3; state.findMany.load(page, limit, search); }, [page, search]); - // Handler pagination → langsung update URL const handlePageChange = (newPage: number) => { const url = new URLSearchParams(searchParams.toString()); if (search) url.set('search', search); if (newPage > 1) url.set('page', newPage.toString()); - else url.delete('page'); // biar page=1 ga muncul di URL + else url.delete('page'); router.replace(`?${url.toString()}`); }; @@ -61,7 +56,7 @@ function Semua() {
) : featuredData ? ( - Berita Utama + Berita Utama @@ -81,13 +76,24 @@ function Semua() { {featuredData.kategoriBerita?.name || 'Berita'} - {featuredData.judul} - + {featuredData.judul} + - + {new Date(featuredData.createdAt).toLocaleDateString('id-ID', { day: 'numeric', month: 'long', @@ -124,7 +130,9 @@ function Semua() { ))}
) : paginatedNews.length === 0 ? ( - Tidak ada berita ditemukan. + + Tidak ada berita ditemukan. + ) : ( {paginatedNews.map((item) => ( @@ -143,11 +151,24 @@ function Semua() { {item.kategoriBerita?.name || 'Berita'} - {item.judul} - + + {item.judul} + + - + {new Date(item.createdAt).toLocaleDateString('id-ID', { day: 'numeric', month: 'short', @@ -187,4 +208,4 @@ function Semua() { ); } -export default Semua; +export default Semua; \ No newline at end of file diff --git a/src/app/darmasaba/(pages)/desa/galery/foto/Content.tsx b/src/app/darmasaba/(pages)/desa/galery/foto/Content.tsx deleted file mode 100644 index e69de29b..00000000 diff --git a/src/app/darmasaba/(pages)/desa/galery/foto/page.tsx b/src/app/darmasaba/(pages)/desa/galery/foto/page.tsx index 322e92c9..b84540e3 100644 --- a/src/app/darmasaba/(pages)/desa/galery/foto/page.tsx +++ b/src/app/darmasaba/(pages)/desa/galery/foto/page.tsx @@ -17,17 +17,11 @@ import { } from '@mantine/core'; import { useShallowEffect } from '@mantine/hooks'; import { IconPhoto } from '@tabler/icons-react'; -import { useRouter } from 'next/navigation'; import { useState } from 'react'; import { useProxy } from 'valtio/utils'; // Komponen kartu foto function FotoCard({ item }: { item: any }) { - const router = useRouter(); - - const handleClick = () => { - router.push(`/darmasaba/galeri/foto/${item.id}`); - }; return ( @@ -35,19 +29,19 @@ function FotoCard({ item }: { item: any }) { shadow="sm" radius="md" p={0} - onClick={handleClick} - style={{ cursor: 'pointer', transition: 'transform 0.2s' }} + style={{ transition: 'transform 0.2s' }} onMouseEnter={(e) => (e.currentTarget.style.transform = 'scale(1.02)')} onMouseLeave={(e) => (e.currentTarget.style.transform = 'scale(1)')} + > {item.imageGalleryFoto?.link ? ( @@ -74,13 +68,23 @@ function FotoCard({ item }: { item: any }) { )} - + {item.name || 'Tanpa Judul'} {item.deskripsi && ( - + )} - + {new Date(item.createdAt).toLocaleDateString('id-ID', { day: 'numeric', month: 'short', @@ -99,7 +103,7 @@ export default function GaleriFotoUser() { return ( {/* Header */} - + <Title order={2} c={colors['blue-button']} mb="lg" ta="center"> Galeri Foto Desa Darmasaba @@ -115,7 +119,7 @@ function FotoList({ search }: { search: string }) { const { data, page, totalPages, loading, load } = FotoState.findMany; useShallowEffect(() => { - load(page, 3, search); // ✅ 9 item per halaman + load(page, 3, search); }, [page, search]); if (loading) { @@ -135,7 +139,9 @@ function FotoList({ search }: { search: string }) {
- Tidak ada foto ditemukan + + Tidak ada foto ditemukan +
); @@ -150,19 +156,18 @@ function FotoList({ search }: { search: string }) {
{/* Pagination */} - -
- { - load(newPage, 3, search); - window.scrollTo({ top: 0, behavior: 'smooth' }); - }} - total={totalPages} - color="blue" - radius="md" - /> -
+
+ { + load(newPage, 3, search); + window.scrollTo({ top: 0, behavior: 'smooth' }); + }} + total={totalPages} + color="blue" + radius="md" + /> +
); } \ No newline at end of file diff --git a/src/app/darmasaba/(pages)/desa/galery/video/Content.tsx b/src/app/darmasaba/(pages)/desa/galery/video/Content.tsx index 2e4599e9..ed4b0667 100644 --- a/src/app/darmasaba/(pages)/desa/galery/video/Content.tsx +++ b/src/app/darmasaba/(pages)/desa/galery/video/Content.tsx @@ -11,7 +11,8 @@ import { Paper, SimpleGrid, Stack, - Text + Text, + Title } from '@mantine/core'; import { useTransitionRouter } from 'next-view-transitions'; import { useCallback, useEffect } from 'react'; @@ -19,15 +20,13 @@ import { useSnapshot } from 'valtio'; export default function VideoContent() { const videoState = useSnapshot(stateGallery.video); - const router = useTransitionRouter() + const router = useTransitionRouter(); const { data, page, totalPages, loading } = videoState.findMany; - // Handle search and pagination changes const loadData = useCallback((pageNum: number, searchTerm: string) => { stateGallery.video.findMany.load(pageNum, 3, searchTerm.trim()); }, []); - // Initial load and URL change handler useEffect(() => { const handleRouteChange = () => { const urlParams = new URLSearchParams(window.location.search); @@ -57,13 +56,14 @@ export default function VideoContent() { loadData(newPage, search); }; - const dataVideo = data || []; if (loading && !data) { return ( - Memuat Video... + + Memuat Video... + ); } @@ -78,55 +78,71 @@ export default function VideoContent() { p="md" radius={26} bg={colors['white-trans-1']} - w={{ base: '100%', md: '100%' }} + w="100%" > - -
- -
-
- - - - {new Date(v.createdAt).toLocaleDateString('id-ID', { - day: 'numeric', - month: 'long', - year: 'numeric', - })} - - - {v.name} - - - - - - - + +
))} +
- Video yang Anda cari tidak tersedia. + + Video yang Anda cari tidak tersedia. +