Fix All Image Add Lazy Loading
This commit is contained in:
@@ -101,7 +101,7 @@ function ListKategoriPrestasi({ search }: { search: string }) {
|
||||
<Tooltip label="Edit" withArrow position="top">
|
||||
<Button
|
||||
variant="light"
|
||||
color="blue"
|
||||
color="green"
|
||||
size="sm"
|
||||
onClick={() => router.push(`/admin/landing-page/prestasi-desa/kategori-prestasi-desa/${item.id}`)}
|
||||
>
|
||||
|
||||
@@ -36,6 +36,7 @@ function EditPrestasiDesa() {
|
||||
})
|
||||
|
||||
useEffect(() => {
|
||||
prestasiState.kategoriPrestasi.findMany.load()
|
||||
const loadDesaAntiKorupsi = async () => {
|
||||
const id = params?.id as string;
|
||||
if (!id) return;
|
||||
@@ -223,6 +224,7 @@ function EditPrestasiDesa() {
|
||||
alt="Preview Gambar"
|
||||
radius="md"
|
||||
style={{ maxHeight: 220, objectFit: 'contain', border: `1px solid ${colors['blue-button']}` }}
|
||||
loading='lazy'
|
||||
/>
|
||||
</Box>
|
||||
)}
|
||||
|
||||
@@ -18,6 +18,7 @@ function DetailPrestasiDesa() {
|
||||
const router = useRouter()
|
||||
|
||||
useShallowEffect(() => {
|
||||
prestasiState.kategoriPrestasi.findMany.load()
|
||||
detailState.findUnique.load(params?.id as string)
|
||||
}, [])
|
||||
|
||||
@@ -93,6 +94,7 @@ function DetailPrestasiDesa() {
|
||||
w={300}
|
||||
fit="contain"
|
||||
style={{ borderRadius: '8px', border: '1px solid #e0e0e0' }}
|
||||
loading='lazy'
|
||||
/>
|
||||
) : (
|
||||
<Text fz="sm" c="dimmed">Tidak ada gambar</Text>
|
||||
|
||||
@@ -131,6 +131,7 @@ function CreatePrestasiDesa() {
|
||||
alt="Pratinjau gambar prestasi"
|
||||
fit="cover"
|
||||
style={{ width: '100%', height: 'auto' }}
|
||||
loading='lazy'
|
||||
/>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
@@ -109,12 +109,14 @@ function ListPrestasi({ search }: { search: string }) {
|
||||
<TableTd style={{ width: '25%', textAlign: 'center' }}>
|
||||
<Tooltip label="Kelola Prestasi" withArrow>
|
||||
<Button
|
||||
size="xs"
|
||||
radius="md"
|
||||
variant="light"
|
||||
color="blue"
|
||||
leftSection={<IconDeviceImacCog size={16} />}
|
||||
onClick={() => router.push(`/admin/landing-page/prestasi-desa/list-prestasi-desa/${item.id}`)}
|
||||
size="sm"
|
||||
>
|
||||
<IconDeviceImacCog size={20} />
|
||||
Detail
|
||||
</Button>
|
||||
</Tooltip>
|
||||
</TableTd>
|
||||
|
||||
Reference in New Issue
Block a user