@@ -30,20 +43,25 @@ export function EntryColumn({
{entries.data?.pages?.map((page, index) => (
{page.entries.map((entry) => (
{
e.stopPropagation()
setActivedEntry(entry.id)
}}
>
-
+
))}
diff --git a/src/renderer/src/components/entry-column/social-media-item.tsx b/src/renderer/src/components/entry-column/social-media-item.tsx
new file mode 100644
index 000000000..f070bde10
--- /dev/null
+++ b/src/renderer/src/components/entry-column/social-media-item.tsx
@@ -0,0 +1,40 @@
+import dayjs from '@renderer/lib/dayjs'
+
+export function SocialMediaItem({
+ entry,
+}: {
+ entry: any,
+}) {
+ return (
+
+

+
+
+
+ {entry.author}
+ ยท
+
+ {dayjs
+ .duration(dayjs(entry.published_at).diff(dayjs(), 'minute'), 'minute')
+ .humanize()}
+
+
+
{entry.text}
+
+
+ {entry.images?.map((image) => (
+

+ ))}
+
+
+
+ )
+}
diff --git a/src/renderer/src/lib/entries.ts b/src/renderer/src/lib/entries.ts
index 983b26964..5386b95cf 100644
--- a/src/renderer/src/lib/entries.ts
+++ b/src/renderer/src/lib/entries.ts
@@ -2,19 +2,19 @@ import { useInfiniteQuery } from '@tanstack/react-query'
import { parseHtml } from './parse-html'
export const useEntries = ({
- type,
+ level,
id,
}: {
- type?: string
+ level?: string
id?: number | string
}) =>
useInfiniteQuery({
- queryKey: ['entries', type, id],
- enabled: !!type && !!id,
+ queryKey: ['entries', level, id],
+ enabled: !!level && !!id,
queryFn: async ({ pageParam }) => {
const entries = await (await fetch(`${import.meta.env.VITE_MINIFLUX_ENDPOINT}/v1/categories/${id}/entries?` + new URLSearchParams({
direction: 'desc',
- limit: '20',
+ limit: '10',
after_entry_id: pageParam,
}), {
headers: {