Skip to content

Commit

Permalink
chore: add centrifuge banner (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
JP authored Sep 25, 2023
1 parent 822d581 commit 17e72cc
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 19 deletions.
18 changes: 18 additions & 0 deletions tinlake-ui/components/ExploreCentrifugeBanner.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Anchor, Box, Card, Paragraph } from 'grommet'

export const ExploreCentrifugeBanner = () => (
<Card
margin={{ top: 'medium' }}
pad={{ top: 'xsmall', bottom: 'xsmall', left: 'medium', right: 'medium' }}
style={{
backgroundColor: '#cde5ff',
}}
>
<Box>
<Paragraph>
Tinlake is no longer supported. Please proceed to the new Centrifuge app at{' '}
<Anchor href="https://app.centrifuge.io" label="app.centrifuge.io" />.
</Paragraph>
</Box>
</Card>
)
6 changes: 6 additions & 0 deletions tinlake-ui/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { useCFGRewards } from '../../utils/useCFGRewards'
import { usePool } from '../../utils/usePool'
import { usePortfolio } from '../../utils/usePortfolio'
import { ClientOnlyRender } from '../ClientOnlyRender'
import { ExploreCentrifugeBanner } from '../ExploreCentrifugeBanner'
import { RewardsBanner } from '../RewardsBanner'
import { useTinlake } from '../TinlakeProvider'
import { Tooltip } from '../Tooltip'
Expand Down Expand Up @@ -257,6 +258,11 @@ const Header: React.FC<Props> = (props: Props) => {
</MobileNav>
</HeaderBar>
{!props.hideRewardsBanner && <RewardsBanner />}
<Box justify="center" direction="row">
<Box width="xlarge">
<ExploreCentrifugeBanner />
</Box>
</Box>
</ClientOnlyRender>
)
}
Expand Down
20 changes: 1 addition & 19 deletions tinlake-ui/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Anchor, Box, Card, Paragraph } from 'grommet'
import { Box } from 'grommet'
import { GetStaticProps } from 'next'
import * as React from 'react'
import Auth from '../components/Auth'
Expand All @@ -14,23 +14,6 @@ interface Props {
ipfsPools: IpfsPools
}

const ExploreCentrifugeBanner = () => (
<Card
margin={{ top: 'medium' }}
pad={{ top: 'xsmall', bottom: 'xsmall', left: 'medium', right: 'medium' }}
style={{
backgroundColor: '#cde5ff',
}}
>
<Box>
<Paragraph>
Tinlake is no longer supported. Please proceed to the new Centrifuge app at{' '}
<Anchor href="https://app.centrifuge.io" label="app.centrifuge.io" />.
</Paragraph>
</Box>
</Card>
)

const Home: React.FC<Props> = (props: Props) => {
return (
<IpfsPoolsProvider value={props.ipfsPools}>
Expand All @@ -41,7 +24,6 @@ const Home: React.FC<Props> = (props: Props) => {
<Box justify="center" direction="row">
<Box width="xlarge">
<Auth>
<ExploreCentrifugeBanner />
<Dashboard ipfsPools={props.ipfsPools} />
</Auth>
</Box>
Expand Down

0 comments on commit 17e72cc

Please sign in to comment.