diff --git a/src/components/column/card.tsx b/src/components/column/card.tsx index 062c466..96df98f 100644 --- a/src/components/column/card.tsx +++ b/src/components/column/card.tsx @@ -8,6 +8,7 @@ import { forwardRef, useCallback, useImperativeHandle, useMemo, useRef } from "r import { sources } from "@shared/sources" import type { SyntheticListenerMap } from "@dnd-kit/core/dist/hooks/utilities" import { ofetch } from "ofetch" +import { useWindowSize } from "react-use" import { OverlayScrollbar } from "../common/overlay-scrollbar" import { focusSourcesAtom, refetchSourcesAtom } from "~/atoms" import { useRelativeTime } from "~/hooks/useRelativeTime" @@ -173,14 +174,14 @@ function NewsUpdatedTime({ date }: { date: string }) { const relativeTime = useRelativeTime(date) return <>{relativeTime} } - function NewsListHot({ query }: Query) { const items = query.data?.items + const { width } = useWindowSize() return ( <> {items?.map((item, i) => ( {items?.map(item => ( @@ -220,7 +222,11 @@ function NewsListTimeLine({ query }: Query) { - + {item.title}