Prettier format pending files
This commit is contained in:
parent
246e84ffe5
commit
d3d22d69ef
2 changed files with 15 additions and 4 deletions
|
|
@ -16,7 +16,9 @@ export default function PageTransition({ children }: PageTransitionProps) {
|
||||||
}, [location.pathname]);
|
}, [location.pathname]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`transition-opacity duration-300 ease-out transform-gpu will-change-[opacity] ${visible ? "opacity-100" : "opacity-0"}`}>
|
<div
|
||||||
|
className={`transition-opacity duration-300 ease-out transform-gpu will-change-[opacity] ${visible ? "opacity-100" : "opacity-0"}`}
|
||||||
|
>
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,10 @@ export default function Feed() {
|
||||||
});
|
});
|
||||||
// If no posts yet, fall back to recommended people as placeholders
|
// If no posts yet, fall back to recommended people as placeholders
|
||||||
if (mapped.length === 0) {
|
if (mapped.length === 0) {
|
||||||
const recs = await aethexSocialService.listRecommended(user?.id || "guest", 12);
|
const recs = await aethexSocialService.listRecommended(
|
||||||
|
user?.id || "guest",
|
||||||
|
12,
|
||||||
|
);
|
||||||
const placeholders: FeedItem[] = recs.map((r: any) => ({
|
const placeholders: FeedItem[] = recs.map((r: any) => ({
|
||||||
id: r.id,
|
id: r.id,
|
||||||
authorId: r.id,
|
authorId: r.id,
|
||||||
|
|
@ -122,9 +125,15 @@ export default function Feed() {
|
||||||
let cleanup: any = null;
|
let cleanup: any = null;
|
||||||
try {
|
try {
|
||||||
const sub = realtimeService.subscribeToCommunityPosts(() => load());
|
const sub = realtimeService.subscribeToCommunityPosts(() => load());
|
||||||
cleanup = () => { try { sub.unsubscribe?.(); } catch {} };
|
cleanup = () => {
|
||||||
|
try {
|
||||||
|
sub.unsubscribe?.();
|
||||||
|
} catch {}
|
||||||
|
};
|
||||||
} catch {}
|
} catch {}
|
||||||
return () => { cleanup?.(); };
|
return () => {
|
||||||
|
cleanup?.();
|
||||||
|
};
|
||||||
}, [user, loading]);
|
}, [user, loading]);
|
||||||
|
|
||||||
const isFollowingAuthor = (id: string) => following.includes(id);
|
const isFollowingAuthor = (id: string) => following.includes(id);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue