fix: fix feed component
This commit is contained in:
@@ -20,7 +20,7 @@ import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import { useWindowVirtualizer } from "@tanstack/react-virtual";
|
||||
import { Loader2 } from "lucide-react";
|
||||
import { feed, type Post, type UserSummary } from "@/lib/social";
|
||||
import { PostCard } from "@/components/social/post/post-card";
|
||||
import { PostScrollCard } from "@/components/social/post/post-scroll-card";
|
||||
import { NewUsersStrip } from "./new-users-strip";
|
||||
|
||||
const PAGE = 10;
|
||||
@@ -74,7 +74,7 @@ export function HomeFeed() {
|
||||
|
||||
const virtualizer = useWindowVirtualizer({
|
||||
count: items.length,
|
||||
estimateSize: () => 460,
|
||||
estimateSize: () => 680,
|
||||
overscan: 4,
|
||||
scrollMargin: offsetTop,
|
||||
});
|
||||
@@ -135,7 +135,7 @@ export function HomeFeed() {
|
||||
style={{ transform: `translateY(${vi.start - offsetTop}px)` }}
|
||||
>
|
||||
<div className="pb-4">
|
||||
<PostCard post={post} enableFollow />
|
||||
<PostScrollCard post={post} enableFollow />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -28,7 +28,7 @@ export function NewUsersStrip({ users }: { users: UserSummary[] }) {
|
||||
New to Prabhupāda Says
|
||||
</h2>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
Welcome them — follow the devotees who just joined.
|
||||
Welcome them by sending a follow request.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user