Skip to content

Commit

Permalink
add check and rm ico
Browse files Browse the repository at this point in the history
  • Loading branch information
shanimal08 committed Dec 6, 2024
1 parent 4d61495 commit 03da95b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ export const Cell = styled.div<{ $alignment?: CSSProperties['alignItems']; $diff
$diff &&
css`
&::after {
content: '${$diff > 0 ? '↑' : '↓'}';
content: '${$diff === 0 ? '✓' : $diff > 0 ? '↑' : '↓'}';
position: absolute;
font-size: 7px;
right: -5px;
top: 50%;
transform: translateY(-50%);
color: ${$diff > 0 ? theme.colors.green[600] : theme.colors.red[600]};
color: ${$diff === 0 ? theme.colors.green[600] : theme.colors.red[600]};
}
`}
`;
Expand Down
5 changes: 2 additions & 3 deletions src/containers/floating/Settings/sections/p2p/PeerTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { timeAgo } from '@app/utils/getTimeAgo.ts';
import { truncateMiddle } from '@app/utils/truncateString.ts';
import { ConnectedPeerInfoExtended } from '@app/containers/floating/Settings/sections/p2p/P2PoolStats.tsx';
import { useP2poolStatsStore } from '@app/store/useP2poolStatsStore.ts';
import tariIcon from '/assets/img/tari.png';

const headings = ['#', 'Peer ID', 'RandomX Height', 'SHA3X Height', 'Last Ping'];

Expand All @@ -24,7 +23,7 @@ export default function PeerTable({ peers }: { peers: ConnectedPeerInfoExtended[
);
});
const peerMarkup = peers.map(({ peer_id, peer_info, last_ping, randomxDiff, sha3Diff }, idx) => {
const count = idx + 1;
const count = idx + 2;
const displayId = truncateMiddle(peer_id, 9);
const { current_sha3x_height: sha3x_height, current_random_x_height: random_x_height } = peer_info || {};

Expand All @@ -46,7 +45,7 @@ export default function PeerTable({ peers }: { peers: ConnectedPeerInfoExtended[
const meMarkup = (
<TableRow key="me" $altBg $isTopRow>
<Cell $alignment="end">
<img src={tariIcon} alt={''} />
<Typography variant="p">{`1.`}</Typography>
</Cell>
<Cell $alignment="start">{`Me`}</Cell>
<Cell>{randomXHeight}</Cell>
Expand Down

0 comments on commit 03da95b

Please sign in to comment.