Skip to content

Commit 512c80c

Browse files
jkbktlfelicio
andauthored
external links (#818)
* update external links * Add changeset for external links update * add soon flag * fix tailwind config * fix class * u * u --------- Co-authored-by: Felicio <felicio@users.noreply.github.com>
1 parent 8a3f4be commit 512c80c

File tree

4 files changed

+50
-46
lines changed

4 files changed

+50
-46
lines changed

.changeset/nasty-ears-act.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"hub": patch
3+
---
4+
5+
external links

apps/hub/src/app/_components/link-item.tsx

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { ExternalIcon } from '@status-im/icons/20'
22
import { Link } from '@status-im/status-network/components'
3+
import { cx } from 'cva'
34
import { usePathname } from 'next/navigation'
45

56
type LinkItemProps = {
@@ -11,6 +12,7 @@ type LinkItemProps = {
1112
}
1213

1314
const LinkItem = (props: LinkItemProps) => {
15+
const { id, label, icon: Icon, href, tag } = props
1416
const pathname = usePathname()
1517

1618
const isActiveRoute = (href: string) => {
@@ -20,31 +22,32 @@ const LinkItem = (props: LinkItemProps) => {
2022
return pathname === href
2123
}
2224

23-
const isExternal = props.href.startsWith('http')
24-
const isActive = isActiveRoute(props.href)
25+
const isExternal = href.startsWith('http')
26+
const isActive = isActiveRoute(href)
2527

2628
return (
27-
<li key={props.id}>
29+
<li key={id}>
2830
<Link
29-
href={props.href}
30-
className={`flex items-center justify-between gap-2 rounded-16 p-4 transition-colors ${
31+
href={href}
32+
className={cx(
33+
'flex items-center justify-between gap-2 rounded-16 p-4 transition-colors',
3134
isActive
3235
? 'bg-customisation-purple-50/5 text-purple'
3336
: 'text-neutral-90 hover:bg-neutral-10 hover:text-neutral-100'
34-
}`}
37+
)}
3538
>
36-
<div className="flex items-center gap-2">
37-
<props.icon className="size-5" />
38-
<span className="text-15 font-medium leading-[1.45] tracking-[-0.9%]">
39-
{props.label}
40-
</span>
41-
{!!props.tag && (
42-
<div className="inline-flex items-center gap-1 rounded-full bg-purple px-1.5 py-0.5">
43-
<span className="text-11 font-medium leading-[1.42] tracking-[-0.5%] text-white-100">
44-
{props.tag}
45-
</span>
46-
</div>
47-
)}
39+
<div className="flex flex-1 items-center justify-between">
40+
<div className={cx('flex items-center gap-2')}>
41+
<Icon className="size-5" />
42+
<span className="text-15 font-medium">{label}</span>
43+
</div>
44+
<div className="flex items-center gap-1">
45+
{!!tag && (
46+
<div className="inline-flex items-center gap-1 rounded-full bg-purple px-1.5 py-0.5">
47+
<span className="text-11 text-white-100">{tag}</span>
48+
</div>
49+
)}
50+
</div>
4851
</div>
4952
{isExternal && <ExternalIcon />}
5053
</Link>

apps/hub/src/app/_components/sidebar.tsx

Lines changed: 17 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,54 +2,38 @@
22

33
import {
44
BridgeIcon,
5-
DepositIcon,
5+
// DepositIcon,
66
DiscoverIcon,
77
DocsIcon,
88
ExplorerIcon,
99
GovernanceIcon,
1010
HomeIcon,
1111
KarmaIcon,
12-
LaunchIcon,
13-
MintIcon,
1412
StakeIcon,
1513
SubmitAppIcon,
16-
SwapIcon,
1714
} from './icons'
1815
import { LinkItem } from './link-item'
1916

2017
const NAV_LINKS = [
2118
{ id: 'dashboard', label: 'Home', icon: HomeIcon, href: '/dashboard' },
22-
{
23-
id: 'deposit',
24-
label: 'Deposit',
25-
icon: DepositIcon,
26-
href: 'https://example.com',
27-
tag: 'Mainnet',
28-
},
19+
// {
20+
// id: 'deposit',
21+
// label: 'Deposit',
22+
// icon: DepositIcon,
23+
// href: '/deposit',
24+
// tag: 'Mainnet',
25+
// },
2926
{ id: 'discover', label: 'Discover', icon: DiscoverIcon, href: '/discover' },
3027
{ id: 'stake', label: 'Stake', icon: StakeIcon, href: '/stake' },
3128
{ id: 'karma', label: 'Karma', icon: KarmaIcon, href: '/karma' },
3229
]
3330

3431
const TOKENS_LINKS = [
35-
{ id: 'swap', label: 'Swap', icon: SwapIcon, href: 'https://example.com' },
36-
{
37-
id: 'launch',
38-
label: 'Launch',
39-
icon: LaunchIcon,
40-
href: 'https://example.com',
41-
},
4232
{
4333
id: 'bridge',
4434
label: 'Bridge',
4535
icon: BridgeIcon,
46-
href: 'https://example.com',
47-
},
48-
{
49-
id: 'mint-usdz',
50-
label: 'Mint USDZ',
51-
icon: MintIcon,
52-
href: 'https://example.com',
36+
href: 'https://bridge.status.network/',
5337
},
5438
]
5539

@@ -58,7 +42,7 @@ const OTHER_LINKS = [
5842
id: 'explorer',
5943
label: 'Explorer',
6044
icon: ExplorerIcon,
61-
href: 'https://example.com',
45+
href: 'https://sepoliascan.status.network/',
6246
},
6347
{
6448
id: 'governance',
@@ -70,9 +54,14 @@ const OTHER_LINKS = [
7054
id: 'submit-app',
7155
label: 'Submit an app',
7256
icon: SubmitAppIcon,
73-
href: '/submit-app',
57+
href: 'https://statusnetwork.typeform.com/builder',
58+
},
59+
{
60+
id: 'docs',
61+
label: 'Docs',
62+
icon: DocsIcon,
63+
href: 'https://docs.status.network/',
7464
},
75-
{ id: 'docs', label: 'Docs', icon: DocsIcon, href: '/docs' },
7665
]
7766

7867
type Props = {

apps/hub/tailwind.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,13 @@ export default {
8787
letterSpacing: '-0.024375rem',
8888
},
8989
],
90+
11: [
91+
'0.6875rem',
92+
{
93+
lineHeight: '0.9625rem',
94+
letterSpacing: '-0.0034375rem',
95+
},
96+
],
9097
},
9198

9299
colors: {

0 commit comments

Comments
 (0)