add program version and ui sha
This commit is contained in:
parent
89cf797ce5
commit
b2a45b7b91
|
@ -4,13 +4,14 @@ import DiscordIcon from './icons/DiscordIcon'
|
|||
import { TwitterIcon } from './icons/TwitterIcon'
|
||||
import { DocumentTextIcon } from '@heroicons/react/20/solid'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { IDL } from '@blockworks-foundation/mango-v4'
|
||||
|
||||
const DEFAULT_LATEST_COMMIT = { sha: '', url: '' }
|
||||
|
||||
const getLatestCommit = async () => {
|
||||
try {
|
||||
const response = await fetch(
|
||||
`https://api.github.com/repos/blockworks-foundation/mango-v4/commits`,
|
||||
`https://api.github.com/repos/blockworks-foundation/mango-v4-ui/commits`,
|
||||
)
|
||||
const data = await response.json()
|
||||
|
||||
|
@ -45,15 +46,19 @@ const StatusBar = () => {
|
|||
<Tps />
|
||||
</div>
|
||||
<div className="col-span-1 text-center">
|
||||
<span className="text-th-fgd-3 text-xs">v{IDL.version}</span>
|
||||
{latestCommit.sha && latestCommit.url ? (
|
||||
<a
|
||||
className="text-th-fgd-3 text-xs focus:outline-none md:hover:text-th-fgd-2"
|
||||
href={latestCommit.url}
|
||||
rel="noreferrer noopener"
|
||||
target="_blank"
|
||||
>
|
||||
{latestCommit.sha}
|
||||
</a>
|
||||
<>
|
||||
<span className="mx-1.5 text-th-fgd-4">|</span>
|
||||
<a
|
||||
className="text-th-fgd-3 text-xs focus:outline-none md:hover:text-th-fgd-2"
|
||||
href={latestCommit.url}
|
||||
rel="noreferrer noopener"
|
||||
target="_blank"
|
||||
>
|
||||
{latestCommit.sha}
|
||||
</a>
|
||||
</>
|
||||
) : null}
|
||||
</div>
|
||||
<div className="col-span-1 flex items-center justify-end space-x-4 text-xs">
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@blockworks-foundation/mango-feeds": "0.1.7",
|
||||
"@blockworks-foundation/mango-v4": "^0.18.8",
|
||||
"@blockworks-foundation/mango-v4": "^0.18.9",
|
||||
"@headlessui/react": "1.6.6",
|
||||
"@heroicons/react": "2.0.10",
|
||||
"@metaplex-foundation/js": "0.19.4",
|
||||
|
|
|
@ -26,10 +26,10 @@
|
|||
dependencies:
|
||||
ws "^8.13.0"
|
||||
|
||||
"@blockworks-foundation/mango-v4@^0.18.8":
|
||||
version "0.18.8"
|
||||
resolved "https://registry.yarnpkg.com/@blockworks-foundation/mango-v4/-/mango-v4-0.18.8.tgz#c8469769537df0f83f84c49e6cdf893efe6dc4c9"
|
||||
integrity sha512-a1UjQHRsaHEjVntCMf3DsYH9Gs5Hd0syi6Yh2CveZEK+Xcy4su0Hy/mfkzrz5sBms7ql5F2HMDvqRynMbd1WDQ==
|
||||
"@blockworks-foundation/mango-v4@0.18.9":
|
||||
version "0.18.9"
|
||||
resolved "https://registry.yarnpkg.com/@blockworks-foundation/mango-v4/-/mango-v4-0.18.9.tgz#606ca87c988470d54a394c944e5a664509a498f0"
|
||||
integrity sha512-ACg0t6xP4385rpCMG53Wl8eTDC7UpZfwLjrqYG3f07suqTEnlqXgNTpAuf7D8k9jUyfW/XHt8HWUaumBW8brtw==
|
||||
dependencies:
|
||||
"@coral-xyz/anchor" "^0.27.0"
|
||||
"@project-serum/serum" "0.13.65"
|
||||
|
|
Loading…
Reference in New Issue