Skip to content

Commit a5b5b6d

Browse files
authored
Remove sSCR (#1531)
1 parent 42f9785 commit a5b5b6d

File tree

2 files changed

+40
-39
lines changed

2 files changed

+40
-39
lines changed

src/app/_components/Portal/index.tsx

Lines changed: 40 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
"use client"
2+
13
import Link from "next/link"
2-
import { Fragment } from "react"
4+
import { Fragment, useState } from "react"
35

46
import { Box, Container, Typography } from "@mui/material"
57

8+
import GetSCRDialog from "@/app/SCR-sSCR/Header/GetSCRDialog"
69
import Bridge from "@/assets/svgs/landingpage/bridge.svg"
710
import Doc from "@/assets/svgs/landingpage/doc.svg"
811
import Ecosystem from "@/assets/svgs/landingpage/ecosystem.svg"
@@ -13,26 +16,27 @@ import { BRIDGE_URL, DOC_URL, ECOSYSTEM_URL, LEVEL_UP_URL, SCROLL_OPEN_URL } fro
1316

1417
import PortalCard from "./PortalCard"
1518

16-
const BUILDER_LIST = [
17-
{
18-
title: "For builders",
19-
items: [
20-
{ icon: Doc, label: "Developer Docs", content: "Everything you need to start building", href: DOC_URL },
21-
{ icon: Levelup, label: "Level Up", content: "Learn ZK and test your dev skills", href: LEVEL_UP_URL },
22-
{ icon: ScrollOpen, label: "Scroll open", content: "A six-week builder program with a $100,000 prize pool", href: SCROLL_OPEN_URL },
23-
],
24-
},
25-
{
26-
title: "For users",
27-
items: [
28-
{ icon: Bridge, label: "Bridge", content: "Deposit your assets to Scroll", href: BRIDGE_URL },
29-
{ icon: Ecosystem, label: "Projects", content: "Explore the dApps on Scroll", href: ECOSYSTEM_URL },
30-
{ icon: Sessions, label: "Get SCR", content: "Vote or propose on Scroll", href: "/SCR-sSCR" },
31-
],
32-
},
33-
]
34-
3519
const Portal = () => {
20+
const [getSCROpen, setGetSCROpen] = useState(false)
21+
const BUILDER_LIST = [
22+
{
23+
title: "For builders",
24+
items: [
25+
{ icon: Doc, label: "Developer Docs", content: "Everything you need to start building", href: DOC_URL },
26+
{ icon: Levelup, label: "Level Up", content: "Learn ZK and test your dev skills", href: LEVEL_UP_URL },
27+
{ icon: ScrollOpen, label: "Scroll open", content: "A six-week builder program with a $100,000 prize pool", href: SCROLL_OPEN_URL },
28+
],
29+
},
30+
{
31+
title: "For users",
32+
items: [
33+
{ icon: Bridge, label: "Bridge", content: "Deposit your assets to Scroll", href: BRIDGE_URL },
34+
{ icon: Ecosystem, label: "Projects", content: "Explore the dApps on Scroll", href: ECOSYSTEM_URL },
35+
{ icon: Sessions, label: "Get SCR", content: "Vote or propose on Scroll", onClick: () => setGetSCROpen(true) },
36+
],
37+
},
38+
]
39+
3640
return (
3741
<Box sx={{ backgroundColor: "themeBackground.light" }}>
3842
<Container sx={{ py: ["5.6rem", "10.6rem"] }}>
@@ -50,17 +54,26 @@ const Portal = () => {
5054
{title}
5155
</Typography>
5256
<Box sx={{ display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(33rem, 1fr))", gap: ["2.4rem", "2.8rem"] }}>
53-
{items.map(({ icon: Icon, label, content, href }) => (
54-
<Link href={href} key={label} target={href.startsWith("https:") ? "_blank" : ""} className="cursor-pointer">
55-
<PortalCard label={label} content={content}>
56-
<Icon></Icon>
57-
</PortalCard>
58-
</Link>
59-
))}
57+
{items.map(({ icon: Icon, label, content, href, onClick }) =>
58+
onClick ? (
59+
<Box key={label} className="cursor-pointer" onClick={onClick}>
60+
<PortalCard label={label} content={content}>
61+
<Icon></Icon>
62+
</PortalCard>
63+
</Box>
64+
) : (
65+
<Link href={href} key={label} target={href.startsWith("https:") ? "_blank" : ""} className="cursor-pointer">
66+
<PortalCard label={label} content={content}>
67+
<Icon></Icon>
68+
</PortalCard>
69+
</Link>
70+
),
71+
)}
6072
</Box>
6173
</Fragment>
6274
))}
6375
<Box></Box>
76+
<GetSCRDialog open={getSCROpen} onClose={() => setGetSCROpen(false)} />
6477
</Container>
6578
</Box>
6679
)

src/components/Header/data.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -118,18 +118,6 @@ const mainnetNavigations: Navigation[] = [
118118
key: "bridge",
119119
href: BRIDGE_URL,
120120
},
121-
{
122-
rootKey: "use",
123-
label: "SCR & sSCR",
124-
key: "scr",
125-
href: "/SCR-sSCR",
126-
},
127-
{
128-
rootKey: "use",
129-
label: "scrETH",
130-
key: "scrETH",
131-
href: "/scrETH",
132-
},
133121
{
134122
rootKey: "use",
135123
label: "Governance",

0 commit comments

Comments
 (0)