Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/send-tokens-display' into send-t…
Browse files Browse the repository at this point in the history
…okens-display

# Conflicts:
#	src/pages/SendTokens/SendTokens.js
  • Loading branch information
pranavkparti committed Jul 18, 2023
2 parents 3494b56 + cfdbbf5 commit 9ff0a00
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 33 deletions.
24 changes: 12 additions & 12 deletions src/components/Routes/ClientRoutes.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { Routes, Route, Navigate, Outlet } from "react-router-dom";
import Wallet from "../../pages/Wallet/Wallet";
import TransferStatus from "../../pages/TransferStatus/TransferStatus";
import Login from "../../pages/Login/Login";
import Layout from "../layout/Layout";
import AuthContext from "../../store/auth-context";
import SendTokens from "../../pages/SendTokens/SendTokens";
import NotFound from "../../pages/NotFound/NotFound";
import { useContext } from "react";
import { Routes, Route, Navigate, Outlet } from 'react-router-dom';
import Wallet from '../../pages/Wallet/Wallet';
import Login from '../../pages/Login/Login';
import Layout from '../layout/Layout';
import AuthContext from '../../store/auth-context';
import SendTokens from '../../pages/SendTokens/SendTokens';
import NotFound from '../../pages/NotFound/NotFound';
import { useContext } from 'react';
import MyTransfers from '../../pages/MyTransfers/MyTransfers';

const ProtectedRoute = ({ isLoggedIn, redirectPath = "/login" }) => {
const ProtectedRoute = ({ isLoggedIn, redirectPath = '/login' }) => {
if (!isLoggedIn) {
return <Navigate to={redirectPath} replace />;
}
Expand All @@ -32,11 +32,11 @@ const ClientRoutes = () => {
}
/>
<Route
path="/transfer-status"
path="/my-transfers"
exact
element={
<Layout>
<TransferStatus />
<MyTransfers />
</Layout>
}
/>
Expand Down
32 changes: 19 additions & 13 deletions src/components/layout/Menu/MenuItem/MenuItem.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
import CompareIcon from '@mui/icons-material/Compare';
import HomeIcon from '@mui/icons-material/Home';
import ThumbsUpDownIcon from '@mui/icons-material/ThumbsUpDown';
import * as React from 'react';
// import { Compare } from '@mui/icons-material';
import LinkItem from './LinkItem';

const MenuItem = ({ open }) => {
return (
<>
<LinkItem itemPath={'/'}
itemName={'Home'}
itemIcon={<HomeIcon />}
open={open} />
<LinkItem itemPath={'/send-tokens'}
itemName={'Send Tokens'}
itemIcon={<ThumbsUpDownIcon />}
open={open} />
{/*<LinkItem itemPath={'/transfer-status'}*/}
{/* itemName={'Transfer Status'}*/}
{/* itemIcon={<Compare />}*/}
{/* open={open} />*/}
<LinkItem
itemPath={'/'}
itemName={'Home'}
itemIcon={<HomeIcon />}
open={open}
/>
<LinkItem
itemPath={'/send-tokens'}
itemName={'Send Tokens'}
itemIcon={<ThumbsUpDownIcon />}
open={open}
/>
<LinkItem
itemPath={'/my-transfers'}
itemName={'My Transfers'}
itemIcon={<CompareIcon />}
open={open}
/>
</>
);
};
Expand Down
7 changes: 7 additions & 0 deletions src/pages/MyTransfers/MyTransfers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';

const MyTransfers = () => {
return <div style={{ marginTop: '9.4vh' }}>My Transfers</div>;
};

export default MyTransfers;
7 changes: 0 additions & 7 deletions src/pages/TransferStatus/TransferStatus.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/pages/Wallet/Wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const Wallet = () => {

// TODO: get wallet id by decoding the token. We get the token after login, which is not implemented yet.
apiClient
.get("/wallets/e63bde5b-49b0-431a-91c7-33f257206fb4")
.get("/wallets/644f4d3b-a53c-457c-8677-42b5b812c23d")
.then((response) => {
const wallet = mapWallet(response.data);
setWallet(wallet);
Expand Down

0 comments on commit 9ff0a00

Please sign in to comment.