Removed avatar display in updated and added sender avatar generation in validations
This commit is contained in:
@@ -12,17 +12,16 @@ function ValidateRoadMap({ season }) {
|
|||||||
<h2 className="text-xl leading-snug font-bold text-slate-800 xl:leading-7 mb-4 xl:mb-0">{''}</h2>
|
<h2 className="text-xl leading-snug font-bold text-slate-800 xl:leading-7 mb-4 xl:mb-0">{''}</h2>
|
||||||
</div>
|
</div>
|
||||||
<div className="grow pb-6 border-b border-slate-200">
|
<div className="grow pb-6 border-b border-slate-200">
|
||||||
|
{season.sender_avatar &&
|
||||||
<header>
|
<header>
|
||||||
<div className="flex flex-nowrap items-center space-x-2 mb-6">
|
<div className="flex flex-nowrap items-center space-x-2 mb-6">
|
||||||
{/* Avatars */}
|
{/* Avatars */}
|
||||||
<div className="flex shrink-0 -space-x-3 -ml-px">
|
<div className="flex shrink-0 -space-x-3 -ml-px">
|
||||||
{season.users_images.map(pic => {
|
<ValidationUsersImg image={season.sender_avatar} size={season.avatar_size}/>
|
||||||
return <ValidationUsersImg image={pic} key={pic.image}/>
|
|
||||||
})}
|
|
||||||
</div>
|
</div>
|
||||||
<div className="text-slate-400">·</div>
|
<div className="text-slate-400">·</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>}
|
||||||
{/* List */}
|
{/* List */}
|
||||||
<ul className="-my-2">
|
<ul className="-my-2">
|
||||||
{/* List item(s) */}
|
{/* List item(s) */}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
function ValidationUsersImg({ image }) {
|
function ValidationUsersImg({ image,size }) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<a className="block">
|
<a className="block">
|
||||||
<img className="rounded-full border-2 border-slate-100 box-content" src={image.image} width={`${image.size}`} alt={image.image} height={`${image.size}`}/>
|
<img className="rounded-full border-2 border-slate-100 box-content" src={image} alt={image} width={size} height={size}/>
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,10 @@
|
|||||||
import { reaction, makeAutoObservable, onBecomeObserved, onBecomeUnobserved} from "mobx";
|
import {reaction, makeAutoObservable, onBecomeObserved, onBecomeUnobserved} from "mobx";
|
||||||
import {cryptography} from "@liskhq/lisk-client";
|
import {cryptography} from "@liskhq/lisk-client";
|
||||||
import { passphrase } from "@liskhq/lisk-client";
|
import { passphrase } from "@liskhq/lisk-client";
|
||||||
import {getNodeInfo} from '../api/node';
|
import {getNodeInfo} from '../api/node';
|
||||||
import {fetchWrapper} from '../shared/fetchWrapper';
|
import {fetchWrapper} from '../shared/fetchWrapper';
|
||||||
import {labelMap} from "../shared/labelMap";
|
import {labelMap} from "../shared/labelMap";
|
||||||
import User08 from "../images/user-28-08.jpg";
|
import {generateSvgAvatar} from "../images/GenerateOnboardingSvg/GenerateSvg";
|
||||||
import User06 from "../images/user-28-06.jpg";
|
|
||||||
import User05 from "../images/user-28-05.jpg";
|
|
||||||
import User09 from "../images/user-28-09.jpg";
|
|
||||||
|
|
||||||
const usersImages = [User08,User06,User05,User09];
|
|
||||||
|
|
||||||
class Store {
|
class Store {
|
||||||
_accountData = []
|
_accountData = []
|
||||||
@@ -157,18 +152,14 @@ class Store {
|
|||||||
return this._transactionsInfo.map(item => {
|
return this._transactionsInfo.map(item => {
|
||||||
return {
|
return {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
users_images: usersImages.map(image => {
|
sender_avatar: item.asset.recipientAddress && generateSvgAvatar(item.senderPublicKey),
|
||||||
return {
|
avatar_size: 24,
|
||||||
image: image,
|
|
||||||
size: 24
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
transaction: item.asset.features.map(asset => {
|
transaction: item.asset.features.map(asset => {
|
||||||
return {
|
return {
|
||||||
transaction_id: item.id,
|
transaction_id: item.id,
|
||||||
address: item.asset.recipientAddress && cryptography.bufferToHex(cryptography.getAddressFromPublicKey(cryptography.hexToBuffer(item.senderPublicKey))),
|
address: item.asset.recipientAddress && cryptography.bufferToHex(cryptography.getAddressFromPublicKey(cryptography.hexToBuffer(item.senderPublicKey))),
|
||||||
value: asset.value,
|
value: asset.value,
|
||||||
label: labelMap[asset.label],
|
label: labelMap[asset.label] || asset.label
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user