Implement a couple missing bits
This commit is contained in:
parent
c5ab005908
commit
bf39791f01
8 changed files with 81 additions and 24 deletions
|
@ -1,4 +1,5 @@
|
|||
import React, {useEffect} from 'react'
|
||||
import {StyleSheet, Text, View} from 'react-native'
|
||||
import {ProfileFollowers as ProfileFollowersComponent} from '../com/profile/ProfileFollowers'
|
||||
import {ScreenParams} from '../routes'
|
||||
import {useStores} from '../../state'
|
||||
|
@ -9,9 +10,22 @@ export const ProfileFollowers = ({visible, params}: ScreenParams) => {
|
|||
|
||||
useEffect(() => {
|
||||
if (visible) {
|
||||
store.nav.setTitle('Followers of')
|
||||
store.nav.setTitle(`Followers of ${name}`)
|
||||
}
|
||||
}, [store, visible])
|
||||
}, [store, visible, name])
|
||||
|
||||
return <ProfileFollowersComponent name={name} />
|
||||
return (
|
||||
<View>
|
||||
<Text style={styles.title}>Followers of {name}</Text>
|
||||
<ProfileFollowersComponent name={name} />
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
title: {
|
||||
fontSize: 21,
|
||||
fontWeight: 'bold',
|
||||
padding: 10,
|
||||
},
|
||||
})
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import React, {useEffect} from 'react'
|
||||
import {StyleSheet, Text, View} from 'react-native'
|
||||
import {ProfileFollows as ProfileFollowsComponent} from '../com/profile/ProfileFollows'
|
||||
import {ScreenParams} from '../routes'
|
||||
import {useStores} from '../../state'
|
||||
|
@ -9,9 +10,22 @@ export const ProfileFollows = ({visible, params}: ScreenParams) => {
|
|||
|
||||
useEffect(() => {
|
||||
if (visible) {
|
||||
store.nav.setTitle('Followers of')
|
||||
store.nav.setTitle(`Followed by ${name}`)
|
||||
}
|
||||
}, [store, visible])
|
||||
}, [store, visible, name])
|
||||
|
||||
return <ProfileFollowsComponent name={name} />
|
||||
return (
|
||||
<View>
|
||||
<Text style={styles.title}>Followed by {name}</Text>
|
||||
<ProfileFollowsComponent name={name} />
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
title: {
|
||||
fontSize: 21,
|
||||
fontWeight: 'bold',
|
||||
padding: 10,
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue