feat: update wording related to tenure

This commit is contained in:
Kyle Fang
2024-12-21 02:02:22 +00:00
parent 2f02f25f75
commit f16a8a10f0
3 changed files with 8 additions and 6 deletions

View File

@@ -123,13 +123,13 @@ export default function InformationComponent(props) {
</span>
</div>
<div>
Start Block <span style={{ float: "right", fontWeight: "bold" }}>{pollObject?.startAtBlock}</span>
Start Tenure Block <span style={{ float: "right", fontWeight: "bold" }}>{pollObject?.startAtBlock}</span>
</div>
<div>
End Block <span style={{ float: "right", fontWeight: "bold" }}>{pollObject?.endAtBlock}</span>
End Tenure Block <span style={{ float: "right", fontWeight: "bold" }}>{pollObject?.endAtBlock}</span>
</div>
<div>
Current Block <span style={{ float: "right", fontWeight: "bold" }}>{currentBlockHeight}</span>
Current Tenure Block <span style={{ float: "right", fontWeight: "bold" }}>{currentBlockHeight}</span>
</div>
{pollObject?.contractAddress &&
<div>

View File

@@ -326,7 +326,7 @@ export default function PollComponent(props) {
Object.keys(resultsByPosition)?.reverse().map((position, index) => (
<tr key={index}>
<td style={{ wordBreak: "break-all" }}>{resultsByPosition[position]?.address &&
<a className="ballot_link" target="_blank" rel="noreferrer" href={formStacksExplorerUrl(resultsByPosition[position]?.address)}>
<a className="ballot_link" target="_blank" rel="noreferrer" href={formStacksExplorerUrl(resultsByPosition[position]?.address, 'address')}>
<span>
{resultsByPosition[position]?.username ? resultsByPosition[position]?.username : resultsByPosition[position]?.address} { }
<svg

View File

@@ -11,9 +11,11 @@ export async function getRecentBlock() {
return responseObject?.results?.[0];
}
export function formStacksExplorerUrl(txId) {
export function formStacksExplorerUrl(txId, type = 'txid') {
return (
"https://explorer.stacks.co/txid/" +
"https://explorer.stxer.xyz/" +
type +
"/" +
txId +
"?chain=" +
(Constants.STACKS_MAINNET_FLAG ? "mainnet" : "testnet")