mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
14 lines
346 B
TypeScript
14 lines
346 B
TypeScript
export default function getApiVersionUrl(version: string | undefined): string | undefined {
|
|
if (!version) {
|
|
return;
|
|
}
|
|
|
|
const [ tag, commit ] = version.split('.+commit.');
|
|
|
|
if (commit) {
|
|
return `https://github.com/blockscout/blockscout/commit/${ commit }`;
|
|
}
|
|
|
|
return `https://github.com/blockscout/blockscout/tree/${ tag }`;
|
|
}
|