bug: double padded notes on profile

This commit is contained in:
Kieran 2023-05-10 13:57:45 +01:00
parent ec4e6498d3
commit 6de9c566e7
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
4 changed files with 20 additions and 22 deletions

View File

@ -114,7 +114,7 @@ const Timeline = (props: TimelineProps) => {
} }
return ( return (
<div className="main-content"> <>
{latestFeed.length > 0 && ( {latestFeed.length > 0 && (
<> <>
<div className="card latest-notes pointer" onClick={() => onShowLatest()} ref={ref}> <div className="card latest-notes pointer" onClick={() => onShowLatest()} ref={ref}>
@ -149,7 +149,7 @@ const Timeline = (props: TimelineProps) => {
<Skeleton width="100%" height="120px" margin="0 0 16px 0" /> <Skeleton width="100%" height="120px" margin="0 0 16px 0" />
</LoadMore> </LoadMore>
)} )}
</div> </>
); );
}; };
export default Timeline; export default Timeline;

View File

@ -15,10 +15,8 @@ export default function NotificationsPage() {
}, []); }, []);
return ( return (
<> <div className="main-content">
<div className="main-content"> <TaskList />
<TaskList />
</div>
{login.publicKey && ( {login.publicKey && (
<Timeline <Timeline
subject={{ subject={{
@ -32,6 +30,6 @@ export default function NotificationsPage() {
method={"TIME_RANGE"} method={"TIME_RANGE"}
/> />
)} )}
</> </div>
); );
} }

View File

@ -230,20 +230,18 @@ export default function ProfilePage() {
case NOTES: case NOTES:
return ( return (
<> <>
<div className="main-content"> {pinned
{pinned .filter(a => a.kind === EventKind.TextNote)
.filter(a => a.kind === EventKind.TextNote) .map(n => {
.map(n => { return (
return ( <Note
<Note key={`pinned-${n.id}`}
key={`pinned-${n.id}`} data={n}
data={n} related={getReactions(pinned, n.id)}
related={getReactions(pinned, n.id)} options={{ showTime: false, showPinned: true, canUnpin: id === loginPubKey }}
options={{ showTime: false, showPinned: true, canUnpin: id === loginPubKey }} />
/> );
); })}
})}
</div>
<Timeline <Timeline
key={id} key={id}
subject={{ subject={{

View File

@ -83,7 +83,9 @@ export default function RootPage() {
<div className="main-content"> <div className="main-content">
{pubKey && <Tabs tabs={tabs} tab={tab} setTab={t => navigate(unwrap(t.data))} />} {pubKey && <Tabs tabs={tabs} tab={tab} setTab={t => navigate(unwrap(t.data))} />}
</div> </div>
<Outlet /> <div className="main-content">
<Outlet />
</div>
</> </>
); );
} }