diff --git a/src/containers/RecentEdits.tsx b/src/containers/RecentEdits.tsx index 55c64a7..a18aecb 100644 --- a/src/containers/RecentEdits.tsx +++ b/src/containers/RecentEdits.tsx @@ -6,72 +6,68 @@ import { Button } from "@/components/ui/button" import { DataTable } from "@/components/DataTable" const columns = [ - { - accessorKey: "title", - header: ({ column }) => { - return ( - - ) - }, - cell: ({ cell, row }) => { - return ( - - - {row.original.title} - - - ) - }, - }, - { - accessorKey: "date", - header: "Date", - }, - { - accessorKey: "time", - header: "Time", - }, + { + accessorKey: "title", + header: ({ column }) => { + return ( + + ) + }, + cell: ({ cell, row }) => { + return ( + + + {row.original.title} + + + ) + }, + }, + { + accessorKey: "date", + header: "Date", + }, ] export default function RecentEdits() { - const { data, isLoading } = useQuery({ - queryKey: ["entries_recent"], - queryFn: () => api.get("/entries?limit=20&sort=date").then((res) => res.data), - }) + const { data, isLoading } = useQuery({ + queryKey: ["entries_recent"], + queryFn: () => api.get("/entries?limit=20&sort=date").then((res) => res.data), + }) - const parsed = data?.data?.map((entry) => { - const [date, time] = entry?.last_modified?.split(" ") - return { - title: entry.title.replace(/_/g, " "), - date: new Date(date).toLocaleString("en-GB", { - day: "numeric", - month: "long", - year: "numeric", - }), - time: time, - link: entry.title, - } - }) + const parsed = data?.data?.map((entry) => { + const [date, time] = entry?.last_modified?.split(" ") + return { + title: entry.title.replace(/_/g, " "), + date: new Date(date).toLocaleString("en-GB", { + day: "numeric", + month: "long", + year: "numeric", + }), + // time: time, + link: entry.title, + } + }) - return ( - <> -
-
-

Recent edits

-
-
-
- -
-
-
- - ) + return ( + <> +
+
+

Recent edits

+
+
+
+ +
+
+
+ + ) }