import React from 'react' ; import './../../App.less' ; import { Layout } from 'antd' ; import { Link } from 'react-router-dom' ; import { components } from '@oyster/common' ; import { Content , Header } from 'antd/lib/layout/layout' ; import Logo from './dark-horizontal-combined-rainbow.inline.svg' ; import { useRpcContext } from '../../hooks/useRpcContext' ; import { getHomeUrl } from '../../tools/routeTools' ; const { AppBar } = components ; export const AppLayout = React . memo ( ( props ) => { return ( < div className = "App" > < Layout > < Header className = "App-Bar" > < div className = "app-title" > < HomeLink > < /HomeLink> < a href = "https://github.com/solana-labs/solana-program-library/blob/master/governance/README.md" > Docs < /a> < /div> < AppBar useWalletBadge = { true } / > < /Header> < Content > { } { props . children } < /Content> < /Layout> < /div>); } ) ; const HomeLink = ( ) => { const { programId } = useRpcContext ( ) ; return ( < Link to = { getHomeUrl ( programId ) } > < img alt = { `Solana Logo` } src = { Logo } style = { { height : 40 } } /> < /Link>); } ;