Skip to content

Commit

Permalink
feat: redirect on logo click #178 (#199)
Browse files Browse the repository at this point in the history
* feat: redirect on logo click  #178

* fix: link

---------

Co-authored-by: Marcel Ebert <[email protected]>
  • Loading branch information
nejcm and ebma committed Jun 27, 2023
1 parent 21dad82 commit 9d42e97
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
23 changes: 15 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,20 @@ 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 }
}
>
<a
href={`https://pendulumchain.org/${isPendulum ? '' : 'amplitude'}`}
target="_blank"
rel="noopener noreferrer"
>
<img className="logo" src={sideBarLogo} alt="" />
{isTestnet && <div className="foucoco-tag">Foucoco testnet</div>}
</a>
</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 @@ -31,10 +31,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 9d42e97

Please sign in to comment.