This commit is contained in:
mgabdev
2020-04-07 21:06:59 -04:00
parent b5e3c2a94f
commit bb4fcdf32d
101 changed files with 1069 additions and 1886 deletions

View File

@@ -11,7 +11,7 @@ const mapStateToProps = (state) => {
return {
isPro: account.get('is_pro'),
}
}
}
const mapDispatchToProps = dispatch => ({
@@ -36,31 +36,31 @@ class GroupsPage extends PureComponent {
render() {
const { children, isPro, onOpenGroupCreateModal } = this.props
let tabs = [
const actions = []
const tabs = [
{
title: 'Featured',
to: '/groups'
to: '/groups',
},
{
title: 'New',
to: '/groups/new'
to: '/groups/new',
},
{
title: 'My Groups',
to: '/groups/browse/member'
to: '/groups/browse/member',
},
]
let actions = []
if (isPro) {
actions = [{
icon: 'group-add',
actions.push({
icon: 'add',
onClick: onOpenGroupCreateModal,
}]
})
tabs.push({
title: 'Admin',
to: '/groups/browse/admin'
to: '/groups/browse/admin',
})
}
@@ -82,4 +82,5 @@ class GroupsPage extends PureComponent {
</DefaultLayout>
)
}
}

View File

@@ -31,8 +31,8 @@ class ListsPage extends PureComponent {
title='Lists'
actions={[
{
icon: 'list-add',
onClick: onOpenListCreateModal
icon: 'add',
onClick: onOpenListCreateModal,
},
]}
layout={(
@@ -48,4 +48,5 @@ class ListsPage extends PureComponent {
</DefaultLayout>
)
}
}

View File

@@ -13,7 +13,7 @@ import ProfileLayout from '../layouts/profile_layout'
const mapStateToProps = (state, { params: { username } }) => {
const accounts = state.getIn(['accounts'])
const account = accounts.find(acct => username.toLowerCase() == acct.getIn(['acct'], '').toLowerCase())
const account = accounts.find(acct => username.toLowerCase() === acct.getIn(['acct'], '').toLowerCase())
const accountId = !!account ? account.get('id') : -1
const isBlocked = state.getIn(['relationships', accountId, 'blocked_by'], false)
@@ -33,6 +33,7 @@ const mapStateToProps = (state, { params: { username } }) => {
export default
@connect(mapStateToProps)
class ProfilePage extends ImmutablePureComponent {
static propTypes = {
children: PropTypes.node,
params: PropTypes.object.isRequired,
@@ -59,7 +60,7 @@ class ProfilePage extends ImmutablePureComponent {
const {
account,
children,
unavailable
unavailable,
} = this.props
return (
@@ -86,4 +87,5 @@ class ProfilePage extends ImmutablePureComponent {
</ProfileLayout>
)
}
}