"use client"; import { Card, Flex, Group, Image, ScrollArea, Stack, Text } from "@mantine/core"; import { IconClock } from "@tabler/icons-react"; import dayjs from "dayjs"; import { clientApi } from "@homarr/api/client"; import { useRequiredBoard } from "@homarr/boards/context"; import type { WidgetComponentProps } from "../definition"; import classes from "./component.module.scss"; export default function RssFeed({ options }: WidgetComponentProps<"rssFeed">) { const [feedEntries] = clientApi.widget.rssFeed.getFeeds.useSuspenseQuery( { urls: options.feedUrls, maximumAmountPosts: typeof options.maximumAmountPosts === "number" ? options.maximumAmountPosts : 100, }, { refetchOnMount: false, refetchOnWindowFocus: false, refetchOnReconnect: false, retry: false, }, ); const board = useRequiredBoard(); const languageDir = options.enableRtl ? "RTL" : "LTR"; return ( {feedEntries.map((feedEntry) => ( {feedEntry.enclosure && ( backdrop )} {feedEntry.title} {!options.hideDescription && feedEntry.description && ( )} {feedEntry.published && } ))} ); } const InfoDisplay = ({ date }: { date: string }) => ( {date} );