-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* new link to blog * fix lint * change close icon to white and remove boldface --------- Co-authored-by: patrickwoodhead <patrick.woodhead@protocol.ai> Co-authored-by: Julian Gruber <julian@juliangruber.com>
- Loading branch information
1 parent
e928313
commit b0a8ec9
Showing
3 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import Text from './Text' | ||
import { useState } from 'react' | ||
import CloseIcon from 'src/assets/img/icons/close.svg?react' | ||
import { openExternalURL } from 'src/lib/station-config' | ||
import { useLocation } from 'react-router' | ||
import { ROUTES } from 'src/lib/routes' | ||
|
||
const RebrandBanner = () => { | ||
const { pathname } = useLocation() | ||
const [visible, setVisible] = useState<boolean>(true) | ||
|
||
if (!visible) { | ||
return null | ||
} | ||
|
||
if (pathname === ROUTES.wallet) { | ||
return null | ||
} | ||
|
||
return ( | ||
<div className='absolute top-0 left-0 pl-28 pt-6 flex'> | ||
<div className='bg-primary ml-1 p-6 pr-12 left-40 flex gap-5 rounded-lg'> | ||
<Text font='mono' size='xs' className="text-white">🚨 Filecoin Station is becoming the Checker Network. <button onClick={() => openExternalURL('https://blog.checker.network/posts/why-web3-needs-the-checker-network')}><Text font='mono' size='xs' bold className="text-white underline" >Read more</Text></button></Text> | ||
<button | ||
className="absolute top-8 right-2" | ||
onClick={() => setVisible(false)} | ||
> | ||
<CloseIcon color="white" /> | ||
</button> | ||
</div> | ||
|
||
</div> | ||
) | ||
} | ||
|
||
export default RebrandBanner |