From 83f990e049f57748185bf0d436a6b67aeba3e181 Mon Sep 17 00:00:00 2001 From: anilhelvaci Date: Fri, 15 Sep 2023 11:33:32 +0300 Subject: [PATCH 1/2] #148 #157 Navigate to PSM and Analytics from the Navbar --- src/config.ts | 4 ++++ src/views/Root.tsx | 14 ++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/config.ts b/src/config.ts index d5c356ea..e2912d21 100644 --- a/src/config.ts +++ b/src/config.ts @@ -34,3 +34,7 @@ export const branchBridgeHref = (branchName: string) => export const signerTarget = 'wallet'; export const disclaimerHref = 'https://docs.inter.trade/disclaimer'; + +export const psmHref = 'https://psm.inter.trade/'; + +export const analyticsHref = 'https://info.inter.trade/'; diff --git a/src/views/Root.tsx b/src/views/Root.tsx index cbbc4528..74022adc 100644 --- a/src/views/Root.tsx +++ b/src/views/Root.tsx @@ -1,6 +1,8 @@ import { NavLink, Outlet, useLocation, Navigate } from 'react-router-dom'; import ConnectWalletButton from '../components/ConnectWalletButton'; import React, { Suspense } from 'react'; +import { HiExternalLink } from 'react-icons/hi'; +import { psmHref, analyticsHref } from "../config"; const NetworkDropdown = React.lazy( () => import('../components/NetworkDropdown'), @@ -9,19 +11,25 @@ const NetworkDropdown = React.lazy( type NavItemProps = { label: string; href: string; + isExternal?: boolean; }; -const NavItem = ({ label, href }: NavItemProps) => { +const NavItem = ({ label, href, isExternal = false }: NavItemProps) => { return (
  • {({ isActive }) => ( <>
    - {label} + + {label} + {isExternal && } + +
    {
    From 26cfcd6dc92e3c548fa1445d849ddecf4aad05a7 Mon Sep 17 00:00:00 2001 From: anilhelvaci Date: Wed, 20 Sep 2023 10:53:00 +0300 Subject: [PATCH 2/2] #148 #157 fix: run `yarn lint:fix` --- src/views/Root.tsx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/views/Root.tsx b/src/views/Root.tsx index 74022adc..a50f0f4a 100644 --- a/src/views/Root.tsx +++ b/src/views/Root.tsx @@ -2,7 +2,7 @@ import { NavLink, Outlet, useLocation, Navigate } from 'react-router-dom'; import ConnectWalletButton from '../components/ConnectWalletButton'; import React, { Suspense } from 'react'; import { HiExternalLink } from 'react-icons/hi'; -import { psmHref, analyticsHref } from "../config"; +import { psmHref, analyticsHref } from '../config'; const NetworkDropdown = React.lazy( () => import('../components/NetworkDropdown'), @@ -25,10 +25,10 @@ const NavItem = ({ label, href, isExternal = false }: NavItemProps) => { {({ isActive }) => ( <>
    - - {label} - {isExternal && } - + + {label} + {isExternal && } +
    {