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

Loading…
Cancel
Save