Notifications: render ScrollTopButton in a Portal

environments/review-fix-tl-jum-epo4gd/deployments/4079
Alex Gleason 12 months ago
parent ff55272d59
commit 9cb677363d
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7

@ -14,7 +14,7 @@ import { getSettings } from 'soapbox/actions/settings';
import PullToRefresh from 'soapbox/components/pull-to-refresh';
import ScrollTopButton from 'soapbox/components/scroll-top-button';
import ScrollableList from 'soapbox/components/scrollable-list';
import { Column } from 'soapbox/components/ui';
import { Column, Portal } from 'soapbox/components/ui';
import PlaceholderNotification from 'soapbox/features/placeholder/components/placeholder-notification';
import { useAppDispatch, useAppSelector, useSettings } from 'soapbox/hooks';
@ -176,11 +176,15 @@ const Notifications = () => {
return (
<Column ref={column} label={intl.formatMessage(messages.title)} withHeader={false}>
{filterBarContainer}
<ScrollTopButton
onClick={handleDequeueNotifications}
count={totalQueuedNotificationsCount}
message={messages.queue}
/>
<Portal>
<ScrollTopButton
onClick={handleDequeueNotifications}
count={totalQueuedNotificationsCount}
message={messages.queue}
/>
</Portal>
<PullToRefresh onRefresh={handleRefresh}>
{scrollContainer}
</PullToRefresh>

Loading…
Cancel
Save