From 0f3807c50d6555fbcad8cc436645724195adacdf Mon Sep 17 00:00:00 2001 From: patrickwoodhead Date: Wed, 15 Jan 2025 20:48:18 -0500 Subject: [PATCH] new link to blog --- main/utils.js | 4 ++- renderer/src/components/Layout.tsx | 2 ++ renderer/src/components/RebrandBanner.tsx | 40 +++++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 renderer/src/components/RebrandBanner.tsx diff --git a/main/utils.js b/main/utils.js index f9d92eb65..9cfff5ba7 100644 --- a/main/utils.js +++ b/main/utils.js @@ -21,7 +21,9 @@ const allowedURLs = [ 'https://filstation.app/', 'https://github.com/filecoin-station/spark', 'https://beryx.io', - 'https://pl-strflt.notion.site/Station-Terms-Conditions-e97da76bb89f49e280c2897aebe4c41f?pvs=4' + 'https://pl-strflt.notion.site/Station-Terms-Conditions-e97da76bb89f49e280c2897aebe4c41f?pvs=4', + 'https://checker.network', + 'https://blog.checker.network/posts/why-web3-needs-the-checker-network' ].map(str => new URL(str)) const allowedURLsRegEx = [ diff --git a/renderer/src/components/Layout.tsx b/renderer/src/components/Layout.tsx index 6d0d5a7fc..8b3716edf 100644 --- a/renderer/src/components/Layout.tsx +++ b/renderer/src/components/Layout.tsx @@ -3,12 +3,14 @@ import Sidebar from 'src/components/Sidebar' import UpdateBanner from 'src/components/UpdateBanner' import WalletWidget from 'src/components/WalletWidget' import DraggableArea from 'src/components/DraggableArea' +import RebrandBanner from 'src/components/RebrandBanner' const Layout = ({ children }: {children: ReactNode}) => { return (
+
diff --git a/renderer/src/components/RebrandBanner.tsx b/renderer/src/components/RebrandBanner.tsx new file mode 100644 index 000000000..c117eff0e --- /dev/null +++ b/renderer/src/components/RebrandBanner.tsx @@ -0,0 +1,40 @@ +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(true) + + if (!visible) { + return null + } + + if (pathname === ROUTES.wallet) { + return null + } + + + return ( +
+
+ 🚨 Filecoin Station is becoming the Checker Network. + +
+ +
+ ) +} + +export default RebrandBanner \ No newline at end of file