diff --git a/app/javascript/mastodon/components/column_header.jsx b/app/javascript/mastodon/components/column_header.jsx index 7fd646690d..a7d07ffdb0 100644 --- a/app/javascript/mastodon/components/column_header.jsx +++ b/app/javascript/mastodon/components/column_header.jsx @@ -13,7 +13,7 @@ import ChevronRightIcon from '@/material-icons/400-24px/chevron_right.svg?react' import CloseIcon from '@/material-icons/400-24px/close.svg?react'; import SettingsIcon from '@/material-icons/400-24px/settings.svg?react'; import { Icon } from 'mastodon/components/icon'; -import { ButtonInTabsBar, useColumnsContext } from 'mastodon/features/ui/util/columns_context'; +import { ButtonInTabsBar } from 'mastodon/features/ui/util/columns_context'; import { WithRouterPropTypes } from 'mastodon/utils/react_router'; import { useAppHistory } from './router'; @@ -26,10 +26,9 @@ const messages = defineMessages({ back: { id: 'column_back_button.label', defaultMessage: 'Back' }, }); -const BackButton = ({ pinned, show, onlyIcon }) => { +const BackButton = ({ onlyIcon }) => { const history = useAppHistory(); const intl = useIntl(); - const { multiColumn } = useColumnsContext(); const handleBackClick = useCallback(() => { if (history.location?.state?.fromMastodon) { @@ -39,10 +38,6 @@ const BackButton = ({ pinned, show, onlyIcon }) => { } }, [history]); - const showButton = history && !pinned && ((multiColumn && history.location?.state?.fromMastodon) || show); - - if (!showButton) return null; - return ( ; } - backButton = ; + if (history && !pinned && ((multiColumn && history.location?.state?.fromMastodon) || showBackButton)) { + backButton = ; + } const collapsedContent = [ extraContent, @@ -199,16 +194,16 @@ class ColumnHeader extends PureComponent {

{hasTitle && ( <> - {showBackButton && backButton} + {backButton} )} - {!hasTitle && showBackButton && backButton} + {!hasTitle && backButton}
{extraButton} diff --git a/app/javascript/mastodon/features/follow_requests/index.jsx b/app/javascript/mastodon/features/follow_requests/index.jsx index 7d651f2ca6..a8f40a31d0 100644 --- a/app/javascript/mastodon/features/follow_requests/index.jsx +++ b/app/javascript/mastodon/features/follow_requests/index.jsx @@ -68,7 +68,7 @@ class FollowRequests extends ImmutablePureComponent { ); return ( - +