fix: mobile pop back to entry list will refresh data

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei
2024-12-03 14:20:39 +08:00
parent 9102203956
commit 3c18768968
2 changed files with 6 additions and 3 deletions
@@ -73,7 +73,7 @@ const DateItemInner: FC<DateItemInnerProps> = ({
const rid = useId()
const RelativeElement = useMemo(
() => (
<m.span key="b" layout layoutId={rid}>
<m.span key="b" className="inline-flex items-center" layout layoutId={rid}>
<RelativeDay date={date} />
</m.span>
),
@@ -175,7 +175,9 @@ const SocialMediaDateItem = ({
// @ts-expect-error
Wrapper={useCallback(
({ children }) => (
<div className="m-auto flex w-[645px] gap-3 pl-5 text-lg">{children}</div>
<div className="m-auto flex w-[645px] max-w-full gap-3 pl-5 text-base lg:text-lg">
{children}
</div>
),
[],
)}
+2 -1
View File
@@ -163,7 +163,8 @@ export const useEntries = ({
staleTime:
// Force refetch unread entries when feed is dirty
fetchUnread && feedUnreadDirty
// HACK: disable refetch when the router is pop to previous page
fetchUnread && feedUnreadDirty && !history.isPop
? 0
: // Keep reduce data fetch logic
reduceRefetch