diff --git a/src/components/DisclaimerBar.tsx b/src/components/DisclaimerBar.tsx index afe24f2814..91ed594613 100644 --- a/src/components/DisclaimerBar.tsx +++ b/src/components/DisclaimerBar.tsx @@ -1,4 +1,5 @@ import React from 'react' +import { useLocation } from 'react-router-dom' import styled from 'styled-components' import { toaster } from 'toasterhea' import LightModal, { ModalProps } from '~/modals/LightModal' @@ -8,38 +9,55 @@ import { Layer } from '~/utils/Layer' const DisclaimerModal = (props: ModalProps) => -export const DisclaimerBar = () => ( - - -
- Streamr risk disclaimer: Unproven technology, participate at your own risk. - Click to{' '} - { - try { - await toaster(DisclaimerModal, Layer.Modal).pop({ - title: 'Disclaimer', - children: ( -

- Streamr 1.0 testnets involve new, unproven technology - including smart contracts and new protocols, which - contain inherent risks. Users should conduct thorough - research before engaging, and participate at their own - risk. Participation can result in irreversible loss of - funds. Exercise caution. Never share your private key - with anyone. -

- ), - }) - } catch (e) {} - }} - > - learn more -
- . -
-
-) +export const DisclaimerBar = () => { + const { pathname } = useLocation() + + // Show disclaimer only for Overview, Sponsorships, Sponsorship, Operators, Operator pages + if (!pathname.includes('/hub/network/')) { + return null + } + + return ( + + +
+ Streamr risk disclaimer: The sponsorship, staking & delegation smart + contracts are unproven technology, participate at your own risk.{' '} + { + try { + await toaster(DisclaimerModal, Layer.Modal).pop({ + title: 'Disclaimer', + children: ( +

+ The Streamr 1.0 testnets involve new, unproven + technology including smart contracts and new + protocols, which contain inherent risks. Users + should conduct thorough research before engaging, + and participate at their own risk. Participation + can result in irreversible loss of funds. Exercise + caution. Never share your private key with anyone.{' '} + + Learn more + + . +

+ ), + }) + } catch (e) {} + }} + > + Learn more + + . +
+
+ ) +} const Root = styled.div` display: grid;