Skip to content

Commit

Permalink
feat: redirect on logo click #178
Browse files Browse the repository at this point in the history
  • Loading branch information
nejcm committed Jun 27, 2023
1 parent 5a9a828 commit d583f23
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
19 changes: 11 additions & 8 deletions src/components/Layout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Bars3Icon } from '@heroicons/react/20/solid';
import { memo, useEffect, useMemo, useState } from 'preact/compat';
import { Outlet, useParams } from 'react-router-dom';
import { Link, Outlet, useParams } from 'react-router-dom';
import { useGlobalState } from '../../GlobalStateProvider';
import AmplitudeLogo from '../../assets/amplitud-logo.svg';
import PendulumLogo from '../../assets/pendulum-logo.png';
Expand Down Expand Up @@ -63,13 +63,16 @@ export default function Layout(): JSX.Element | null {
visible ? 'open left-0' : 'closed -left-full'
}`}
>
<img
className="pendulum-logo"
src={sideBarLogo}
alt=""
style={isPendulum ? {} : { marginTop: 20, marginBottom: 30, marginLeft: 30 }}
/>
{isTestnet && <div className="foucoco-tag">Foucoco testnet</div>}
<div
style={
isPendulum ? { marginLeft: 20, marginBottom: 20 } : { marginTop: 20, marginBottom: 30, marginLeft: 30 }
}
>
<Link to={`/${network}/dashboard`} target="_blank">
<img className="logo" src={sideBarLogo} alt="" />
{isTestnet && <div className="foucoco-tag">Foucoco testnet</div>}
</Link>
</div>
<Nav onClick={() => setVisible(false)} />
<div className="sidebar-footer">
<Versions tenantName={state.tenantName} />
Expand Down
4 changes: 1 addition & 3 deletions src/components/Layout/styles.sass
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@ $menu: 32px
@media screen and (max-width: $medium)
box-shadow: 5px 0 8px rgba(0, 0, 0, .1)

.pendulum-logo
#sidebar-wrapper .logo
width: 160px
margin-left: 20px
margin-bottom: 20px

.foucoco-tag
font-family: 'Nunito Sans'
Expand Down

0 comments on commit d583f23

Please sign in to comment.