mirror of
https://github.com/oceanprotocol/market.git
synced 2024-06-29 00:57:50 +02:00
* add portis * library loading tinkering * bump packages * typings fix * pip as addon * remove setuptools * revert typings fix * modal styling * show portis button * provider name workaround * for faulty getInjectedProviderName() * fixes https://github.com/oceanprotocol/market/issues/332 * more usage of provider info object * output respective wallet logos * add network switcher for Portis * add functionality * prototype for portis network switching * improve user experience when reconnecting to cached provider * support mainnet only, leave networking switching code commented out
57 lines
1013 B
TypeScript
57 lines
1013 B
TypeScript
import { useStaticQuery, graphql } from 'gatsby'
|
|
|
|
const query = graphql`
|
|
query {
|
|
site {
|
|
siteMetadata {
|
|
siteTitle
|
|
siteTagline
|
|
siteUrl
|
|
siteIcon
|
|
copyright
|
|
menu {
|
|
name
|
|
link
|
|
}
|
|
warning
|
|
appConfig {
|
|
infuraProjectId
|
|
network
|
|
marketFeeAddress
|
|
currencies
|
|
portisId
|
|
}
|
|
}
|
|
}
|
|
|
|
siteImage: allFile(filter: { relativePath: { eq: "site.json" } }) {
|
|
edges {
|
|
node {
|
|
childContentJson {
|
|
site {
|
|
siteImage {
|
|
childImageSharp {
|
|
original {
|
|
src
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`
|
|
|
|
export function useSiteMetadata() {
|
|
const data = useStaticQuery(query)
|
|
|
|
const siteMeta = {
|
|
...data.siteImage.edges[0].node.childContentJson.site,
|
|
...data.site.siteMetadata
|
|
}
|
|
|
|
return siteMeta
|
|
}
|