diff --git a/frontend/src/components/Dropdown/Dropdown.jsx b/frontend/src/components/Dropdown/Dropdown.jsx
index 46d5ce0d88..3f750a6a11 100644
--- a/frontend/src/components/Dropdown/Dropdown.jsx
+++ b/frontend/src/components/Dropdown/Dropdown.jsx
@@ -21,6 +21,19 @@ export default class Dropdown extends React.Component {
window.removeEventListener("click", this.handleClick)
}
+ componentDidUpdate(prevProps, prevState) {
+ const didUpdate = prevState.isOpen !== this.state.isOpen
+ if (didUpdate) {
+ if (this.state.isOpen && this.props.onOpen) {
+ this.props.onOpen(this.root)
+ }
+
+ if (!this.state.isOpen && this.props.onClose) {
+ this.props.onClose(this.root)
+ }
+ }
+ }
+
handleClick = (event) => {
if (
this.state.isOpen &&
@@ -43,10 +56,9 @@ export default class Dropdown extends React.Component {
render() {
const { isOpen } = this.state
- const RootElement = this.props.listItem ? "li" : "div"
return (
-
- {interpolate( - ngettext( - "There is %(more)s more post in this thread.", - "There are %(more)s more posts in this thread.", - posts.more - ), - { more: posts.more }, - true - )} -
- ) - } - - return{gettext("There are no more posts in this thread.")}
-} - -export default ThreadPostsLeft diff --git a/frontend/src/components/thread/ThreadToolbarBottom.jsx b/frontend/src/components/thread/ThreadToolbarBottom.jsx index 48d7714989..7d932d613b 100644 --- a/frontend/src/components/thread/ThreadToolbarBottom.jsx +++ b/frontend/src/components/thread/ThreadToolbarBottom.jsx @@ -1,7 +1,6 @@ import React from "react" import { Toolbar, ToolbarItem, ToolbarSection, ToolbarSpacer } from "../Toolbar" -import ThreadPagination from "./ThreadPagination" -import ThreadPostsLeft from "./ThreadPostsLeft" +import ThreadPaginator from "./ThreadPaginator" import ThreadPostsModeration from "./ThreadPostsModeration" import ThreadReplyButton from "./ThreadReplyButton" import ThreadWatchButton from "./ThreadWatchButton" @@ -15,34 +14,21 @@ const ThreadToolbarBottom = ({ onReply, }) => (