mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-18 02:41:39 +03:00
swapped voting power for resource credits
This commit is contained in:
parent
3f08d3dc66
commit
8bb0e156dd
@ -18,7 +18,7 @@ interface Props {
|
||||
export const ProfileStats = ({data, horizontalMargin}: Props) => {
|
||||
return (
|
||||
<View style={{flexDirection:'row', justifyContent:'space-around', marginTop:40, marginHorizontal:horizontalMargin }}>
|
||||
{data.map((item)=><StatItem label={item.label} value={item.value}/>)}
|
||||
{data.map((item)=><StatItem label={item.label} value={item.value && (item.value + (item.suffix || ''))}/>)}
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ import { parseReputation } from '../../../../utils/user'
|
||||
import { default as ROUTES } from '../../../../constants/routeNames';
|
||||
import { ActionPanel } from './actionPanel'
|
||||
import moment from 'moment'
|
||||
import { getTimeFromNow } from '../../../../utils/time'
|
||||
import { getTimeFromNow, getTimeFromNowNative } from '../../../../utils/time'
|
||||
|
||||
interface QuickProfileContentProps {
|
||||
username:string,
|
||||
@ -131,17 +131,17 @@ export const QuickProfileContent = ({
|
||||
let _avatarUrl = '';
|
||||
let _about = '';
|
||||
let _reputation = 0;
|
||||
let _created = '';
|
||||
let _createdData = null;
|
||||
|
||||
if (user && !isLoading) {
|
||||
_votingPower = getVotingPower(user).toFixed(1);
|
||||
_resourceCredits = getRcPower(user).toFixed(1);
|
||||
_resourceCredits = getRcPower(user).toFixed(0);
|
||||
_postCount = user.post_count || 0;
|
||||
_avatarUrl = user.avatar || '';
|
||||
_about = user.about?.profile?.about || '';
|
||||
_reputation = parseReputation(user.reputation);
|
||||
_created = getTimeFromNow(user.created)
|
||||
|
||||
_createdData = getTimeFromNowNative(user.created)
|
||||
|
||||
if(follows){
|
||||
_followerCount = follows.follower_count || 0;
|
||||
_followingCount = follows.following_count || 0
|
||||
@ -157,7 +157,7 @@ export const QuickProfileContent = ({
|
||||
] as StatsData[]
|
||||
|
||||
const statsData2 = [
|
||||
{label:'Voting Power', value:_votingPower, suffix:'%'},
|
||||
{label:'Resource Credits', value:_resourceCredits, suffix:'%'},
|
||||
{label:'Reputation', value:_reputation},
|
||||
] as StatsData[]
|
||||
|
||||
@ -167,8 +167,8 @@ export const QuickProfileContent = ({
|
||||
username={username}
|
||||
about={_about}
|
||||
avatarUrl={_avatarUrl}
|
||||
created={_created}
|
||||
resourceCredits={_resourceCredits}
|
||||
created={_createdData}
|
||||
votingPower={_votingPower}
|
||||
isLoading={isLoading}
|
||||
onPress={_openFullProfile}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user