Add user invite codes (#393)
* Add mobile UIs for invite codes * Update invite code UIs for web * Finish implementing invite code behaviors (including notifications of invited users) * Bump deps * Update web right nav to use real data; also fix lint
This commit is contained in:
parent
8e28d3c6be
commit
ea04c2bd33
26 changed files with 932 additions and 246 deletions
|
@ -6,13 +6,15 @@ import {useStores} from 'state/index'
|
|||
import * as Toast from '../util/Toast'
|
||||
import {FollowState} from 'state/models/cache/my-follows'
|
||||
|
||||
const FollowButton = observer(
|
||||
export const FollowButton = observer(
|
||||
({
|
||||
type = 'inverted',
|
||||
unfollowedType = 'inverted',
|
||||
followedType = 'inverted',
|
||||
did,
|
||||
onToggleFollow,
|
||||
}: {
|
||||
type?: ButtonType
|
||||
unfollowedType?: ButtonType
|
||||
followedType?: ButtonType
|
||||
did: string
|
||||
onToggleFollow?: (v: boolean) => void
|
||||
}) => {
|
||||
|
@ -48,12 +50,12 @@ const FollowButton = observer(
|
|||
|
||||
return (
|
||||
<Button
|
||||
type={followState === FollowState.Following ? 'default' : type}
|
||||
type={
|
||||
followState === FollowState.Following ? followedType : unfollowedType
|
||||
}
|
||||
onPress={onToggleFollowInner}
|
||||
label={followState === FollowState.Following ? 'Unfollow' : 'Follow'}
|
||||
/>
|
||||
)
|
||||
},
|
||||
)
|
||||
|
||||
export default FollowButton
|
||||
|
|
|
@ -8,7 +8,7 @@ import {UserAvatar} from '../util/UserAvatar'
|
|||
import {s} from 'lib/styles'
|
||||
import {usePalette} from 'lib/hooks/usePalette'
|
||||
import {useStores} from 'state/index'
|
||||
import FollowButton from './FollowButton'
|
||||
import {FollowButton} from './FollowButton'
|
||||
|
||||
export function ProfileCard({
|
||||
testID,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue