This commit is contained in:
mgabdev
2020-03-12 12:09:15 -04:00
parent 5661277d9d
commit bc386bf9d5
23 changed files with 152 additions and 190 deletions

View File

@@ -25,6 +25,12 @@ class GroupPage extends ImmutablePureComponent {
dispatch: PropTypes.func.isRequired,
}
componentDidMount() {
const { group } = this.props
const groupTitle = !group ? '...' : group.get('title')
document.title = `Group / ${groupTitle} - Gab`
}
componentWillMount() {
const { params: { id }, dispatch } = this.props

View File

@@ -5,6 +5,10 @@ import DefaultLayout from '../layouts/default_layout'
export default class GroupsPage extends PureComponent {
componentDidMount() {
document.title = 'Groups - Gab'
}
handleClickNewList () {
console.log("handleClickNewList")
}

View File

@@ -12,6 +12,10 @@ import Divider from '../components/divider'
export default class HomePage extends PureComponent {
componentDidMount() {
document.title = '(1) Home - Gab'
}
handleEditHomeTimeline () {
console.log("handleEditHomeTimeline")
}

View File

@@ -17,6 +17,12 @@ class ListPage extends ImmutablePureComponent {
list: ImmutablePropTypes.map,
};
componentDidMount() {
const { list } = this.props
const listTitle = !list ? '...' : list.get('title')
document.title = `List / ${listTitle} - Gab`
}
handleEditListTimeline () {
console.log("handleEditListTimeline")
}

View File

@@ -6,6 +6,10 @@ import DefaultLayout from '../layouts/default_layout'
export default class ListsPage extends PureComponent {
componentDidMount() {
document.title = 'Lists - Gab'
}
handleClickNewList () {
console.log("handleClickNewList")
}

View File

@@ -6,6 +6,11 @@ import TrendsPanel from '../components/panel/trends_panel'
import DefaultLayout from '../layouts/default_layout'
export default class NotificationsPage extends PureComponent {
componentDidMount() {
document.title = 'Notifications - Gab'
}
render() {
const { children } = this.props

View File

@@ -41,6 +41,15 @@ class ProfilePage extends ImmutablePureComponent {
unavailable: PropTypes.bool.isRequired,
}
componentDidMount() {
const { account, params: { username } } = this.props
if (!!account) {
document.title = `${account.get('display_name')} (@${username}) - Gab`
} else {
document.title = `@${username} - Gab`
}
}
componentWillMount() {
const { dispatch, params: { username } } = this.props
dispatch(fetchAccountByUsername(username))

View File

@@ -4,6 +4,10 @@ import SearchFilterPanel from '../components/panel/search_filter_panel'
import SearchLayout from '../layouts/search_layout'
export default class SearchPage extends PureComponent {
componentDidMount() {
document.title = `Search - Gab`
}
render() {
const { children } = this.props