Skip to content

Commit

Permalink
(fix) Fix formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
rrw-zilliqa committed Jul 8, 2024
1 parent 1fdfb52 commit 4cf83c8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
8 changes: 6 additions & 2 deletions src/components/Timestamp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,19 @@ const Timestamp: React.FC<TimestampProps> = ({ value, age }) => {

let snippet;
if (age === undefined || age) {
snippet = <span><TimestampAge timestamp={value} /> ({tsString})</span>;
snippet = (
<span>
<TimestampAge timestamp={value} /> ({tsString})
</span>
);
} else {
snippet = <span>{tsString}</span>;
}

return (
<div className="flex items-baseline space-x-1">
<FontAwesomeIcon className="self-center" icon={faClock} size="sm" />
{ snippet }
{snippet}
</div>
);
};
Expand Down
9 changes: 6 additions & 3 deletions src/search/DSBlockItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ const DSBlockItem: React.FC<DSBlockItemProps> = ({
</span>
<span>{commify(block.header.Difficulty)}</span>
<span>{commify(block.header.DifficultyDS)}</span>
<span className="col-span-2 truncate"><Timestamp
age={false} value={zilliqaToOtterscanTimestamp(block.header.Timestamp)}
/></span>
<span className="col-span-2 truncate">
<Timestamp
age={false}
value={zilliqaToOtterscanTimestamp(block.header.Timestamp)}
/>
</span>
<span className="col-span-2 truncate">
<TransactionAddress
address={pubKeyToAddr(block.header.LeaderPubKey)}
Expand Down
1 change: 0 additions & 1 deletion src/search/RecentBlockItem.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from "react";
import { NavLink } from "react-router-dom";
import BlockLink from "../components/BlockLink";
import TimestampAge from "../components/TimestampAge";
import Timestamp from "../components/Timestamp";
import { formatValue } from "../components/formatter";
import BlockReward from "../execution/components/BlockReward";
Expand Down

0 comments on commit 4cf83c8

Please sign in to comment.