From 41cd2619b3f756828834668248b07973af3103c0 Mon Sep 17 00:00:00 2001 From: Eugene Chybisov Date: Tue, 20 Sep 2022 21:22:13 +0100 Subject: [PATCH] fix: hide powered by section on token page --- packages/widget/src/components/PoweredBy/PoweredBy.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/widget/src/components/PoweredBy/PoweredBy.tsx b/packages/widget/src/components/PoweredBy/PoweredBy.tsx index 6def99e52..f90b2d3e8 100644 --- a/packages/widget/src/components/PoweredBy/PoweredBy.tsx +++ b/packages/widget/src/components/PoweredBy/PoweredBy.tsx @@ -1,9 +1,18 @@ import { Box, Tooltip, Typography } from '@mui/material'; +import { useLocation } from 'react-router-dom'; import { version } from '../../config/version'; +import { navigationRoutes } from '../../utils'; import { LiFiLogo } from '../LiFiLogo'; import { Link } from './PoweredBy.style'; export const PoweredBy: React.FC = () => { + const { pathname } = useLocation(); + if ( + pathname.includes(navigationRoutes.fromToken) || + pathname.includes(navigationRoutes.toToken) + ) { + return null; + } return (