From b7aecea43345ff19e2cf1cf978040a44f522c8bf Mon Sep 17 00:00:00 2001 From: amaliadwiy Date: Thu, 28 May 2026 14:18:08 +0800 Subject: [PATCH] feat: nama desa di activity logs bisa diklik menuju village detail --- src/frontend/routes/apps.$appId.logs.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/frontend/routes/apps.$appId.logs.tsx b/src/frontend/routes/apps.$appId.logs.tsx index 7e6a671..3bad334 100644 --- a/src/frontend/routes/apps.$appId.logs.tsx +++ b/src/frontend/routes/apps.$appId.logs.tsx @@ -2,6 +2,7 @@ import { useEffect, useState } from 'react' import useSWR from 'swr' import { ActionIcon, + Anchor, Avatar, Badge, Code, @@ -20,7 +21,7 @@ import { } from '@mantine/core' import { useDebouncedValue, useMediaQuery } from '@mantine/hooks' import { DatePickerInput } from '@mantine/dates' -import { createFileRoute, useParams } from '@tanstack/react-router' +import { createFileRoute, useNavigate, useParams } from '@tanstack/react-router' import { TbAlertCircle, TbCalendar, @@ -42,6 +43,7 @@ interface LogEntry { desc: string username: string village: string + idVillage: string } const fetcher = (url: string) => fetch(url).then((res) => res.json()) @@ -81,6 +83,7 @@ function LogTimestamp({ value }: { value: string }) { function AppLogsPage() { const { appId } = useParams({ from: '/apps/$appId/logs' }) + const navigate = useNavigate() const [page, setPage] = useState(1) const [search, setSearch] = useState('') const [searchQuery, setSearchQuery] = useState('') @@ -272,7 +275,15 @@ function AppLogsPage() { - {log.village} + navigate({ to: `/apps/${appId}/villages/${log.idVillage}` })} + style={{ cursor: 'pointer' }} + > + {log.village} +