Change size (#4957)
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
import {GeneratorView} from '@atproto/api/dist/client/types/app/bsky/feed/defs'
|
||||
import {msg} from '@lingui/macro'
|
||||
|
||||
import {STARTER_PACK_MAX_SIZE} from 'lib/constants'
|
||||
import {useSession} from 'state/session'
|
||||
import * as Toast from '#/view/com/util/Toast'
|
||||
|
||||
@@ -73,9 +74,10 @@ function reducer(state: State, action: Action): State {
|
||||
updatedState = {...state, description: action.description}
|
||||
break
|
||||
case 'AddProfile':
|
||||
if (state.profiles.length >= 51) {
|
||||
if (state.profiles.length > STARTER_PACK_MAX_SIZE) {
|
||||
Toast.show(
|
||||
msg`You may only add up to 50 profiles`.message ?? '',
|
||||
msg`You may only add up to ${STARTER_PACK_MAX_SIZE} profiles`
|
||||
.message ?? '',
|
||||
'info',
|
||||
)
|
||||
} else {
|
||||
@@ -91,8 +93,8 @@ function reducer(state: State, action: Action): State {
|
||||
}
|
||||
break
|
||||
case 'AddFeed':
|
||||
if (state.feeds.length >= 50) {
|
||||
Toast.show(msg`You may only add up to 50 feeds`.message ?? '', 'info')
|
||||
if (state.feeds.length >= 3) {
|
||||
Toast.show(msg`You may only add up to 3 feeds`.message ?? '', 'info')
|
||||
} else {
|
||||
updatedState = {...state, feeds: [...state.feeds, action.feed]}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user