diff --git a/src/renderer/src/components/entry-column/article-item.tsx b/src/renderer/src/components/entry-column/article-item.tsx new file mode 100644 index 000000000..d8f200987 --- /dev/null +++ b/src/renderer/src/components/entry-column/article-item.tsx @@ -0,0 +1,33 @@ +import dayjs from '@renderer/lib/dayjs' + +export function ArticleItem({ + entry, +}: { + entry: any, +}) { + return ( + <> + +
+
+ {dayjs + .duration(dayjs(entry.published_at).diff(dayjs(), 'minute'), 'minute') + .humanize()}{' '} + ago +
+
{entry.title}
+
{entry.text}
+
+ {entry.images?.[0] && ( + + )} + + ) +} diff --git a/src/renderer/src/components/entry-column/index.tsx b/src/renderer/src/components/entry-column/index.tsx index fc0dcb779..66e4c0823 100644 --- a/src/renderer/src/components/entry-column/index.tsx +++ b/src/renderer/src/components/entry-column/index.tsx @@ -1,8 +1,8 @@ import { useEntries } from '@renderer/lib/entries' import { ActivedList } from '@renderer/lib/types' -import dayjs from '@renderer/lib/dayjs' import { m } from 'framer-motion' import { cn } from '@renderer/lib/utils' +import { ArticleItem } from './article-item' export function EntryColumn({ activedList, @@ -43,27 +43,7 @@ export function EntryColumn({ setActivedEntry(entry.id) }} > - -
-
- {dayjs - .duration(dayjs(entry.published_at).diff(dayjs(), 'minute'), 'minute') - .humanize()}{' '} - ago -
-
{entry.title}
-
{entry.text}
-
- {entry.images?.[0] && ( - - )} + ))}