From 11465b505e8d1c4b2381cd88fd4ba3a6f022549c Mon Sep 17 00:00:00 2001 From: Shreerang Kale Date: Thu, 25 Jul 2024 17:34:04 +0530 Subject: [PATCH] Refactor app title and logo to header --- src/App.tsx | 2 ++ src/components/Header.tsx | 32 ++++++++++++++++++++++++++++++++ src/layout/SignPageLayout.tsx | 22 ++-------------------- src/pages/ConnectWallet.tsx | 20 ++------------------ 4 files changed, 38 insertions(+), 38 deletions(-) create mode 100644 src/components/Header.tsx diff --git a/src/App.tsx b/src/App.tsx index 7d74c45..6c5fedd 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -9,11 +9,13 @@ import OnboardingSuccess from "./pages/OnboardingSuccess"; import SignPageLayout from "./layout/SignPageLayout"; import UserVerification from "./pages/UserVerification"; import TermsAndConditions from "./pages/TermsAndConditions"; +import Header from "./components/Header"; import { WalletConnectProvider } from "./context/WalletConnectContext"; function App() { return ( +
} /> diff --git a/src/components/Header.tsx b/src/components/Header.tsx new file mode 100644 index 0000000..86faaca --- /dev/null +++ b/src/components/Header.tsx @@ -0,0 +1,32 @@ +import React from 'react'; +import { AppBar, Toolbar, Avatar, Box, IconButton } from '@mui/material'; +import { Link, useLocation } from 'react-router-dom'; + +const Header: React.FC = () => { + const location = useLocation() + + return ( + + + + + + + Testnet Onboarding + + + + + + ); +}; + +export default Header; diff --git a/src/layout/SignPageLayout.tsx b/src/layout/SignPageLayout.tsx index 3bb5e9e..c59f459 100644 --- a/src/layout/SignPageLayout.tsx +++ b/src/layout/SignPageLayout.tsx @@ -1,14 +1,12 @@ import React from "react"; -import { Outlet, useNavigate, Link } from "react-router-dom"; +import { Outlet, useNavigate } from "react-router-dom"; import { Toolbar, - IconButton, Avatar, Button, Typography, - Container, - Box, + Container } from "@mui/material"; import { useWalletConnectContext } from "../context/WalletConnectContext"; @@ -25,22 +23,6 @@ const SignPageLayout = () => { return ( <> - - - - - Testnet Onboarding - - -