Skip to content

Commit ee93a72

Browse files
authored
Merge pull request #1413 from scroll-tech/sessions2
Session 2
2 parents 46dcca5 + fd450c7 commit ee93a72

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+2892
-2128
lines changed

next.config.mjs

+6
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ const nextConfig = {
8383
port: "",
8484
pathname: "/token-list/data/**",
8585
},
86+
{
87+
protocol: "https",
88+
hostname: "scroll-eco-list.netlify.app",
89+
port: "",
90+
pathname: "/logos/**",
91+
},
8692
],
8793
},
8894
// eslint-disable-next-line

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
"typescript": "^5.1.6"
9595
},
9696
"engines": {
97-
"node": ">=20.0.0"
97+
"node": "22.x"
9898
},
9999
"packageManager": "[email protected]"
100100
}

public/imgs/token/sSCR.svg

+18
Loading

public/imgs/token/scr.svg

+10
Loading

public/imgs/token/scrETH.svg

+14
Loading

src/apis/sessions.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
const baseUrl = process.env.NEXT_PUBLIC_OPEN_BLOCK_URI
1+
// const baseUrl = process.env.NEXT_PUBLIC_OPEN_BLOCK_URI
22
const venusUrl = process.env.NEXT_PUBLIC_SCROLL_VENUS_URI
33

4-
export const fetchPastWalletPointsUrl = address => `${baseUrl}/scroll/wallet-points?walletAddress=${address}`
5-
export const fetchCurrentWalletPointsUrl = address => `${baseUrl}/scroll/wallet-points-s2?walletAddress=${address}`
6-
7-
export const fetchTokensMarksUrl = address => `${baseUrl}/scroll/bridge-balances?walletAddress=${address}`
8-
export const fetchProjectsMarksUrl = address => `${baseUrl}/scroll/project-marks?walletAddress=${address}`
4+
const baseUrl = process.env.NEXT_PUBLIC_SESSIONS_URI
95

106
export const checkSignStatus = address => `${venusUrl}/v1/signature/address?address=${address}`
117
export const updateSignStatus = `${venusUrl}/v1/signature/sign`
8+
9+
export const fetchSession0And1TotalMarksURL = address => `${baseUrl}/session1-marks/${address}`
10+
export const fetchSession2TotalMarksURL = address => `${baseUrl}/session2-marks/${address}`
11+
export const fetchSession2PerProtocolMarksURL = address => `${baseUrl}/session2-project-marks/${address}`

src/app/SCR-sSCR/Explaination/data.ts

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import SecureSvg from "@/assets/svgs/defi/secure.svg"
2+
import UpSvg from "@/assets/svgs/defi/up.svg"
3+
import VoteSvg from "@/assets/svgs/defi/vote.svg"
4+
5+
const data = [
6+
{
7+
icon: SecureSvg,
8+
title: "Liquid and secure",
9+
description: "sSCR can be traded, used as collateral, or, in the future, used to secure AVSs, key features, and applications.",
10+
},
11+
{
12+
icon: VoteSvg,
13+
title: "Maintain voting power",
14+
description: "Users can deploy sSCR to eligible DeFi destinations on Scroll while maintaining its voting power.",
15+
},
16+
{
17+
icon: UpSvg,
18+
title: "Multiple integrations in DeFi",
19+
description: "An additional Marks multiplier is applied for users that deposit sSCR into eligible DeFi destinations.",
20+
},
21+
]
22+
23+
export default data
+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
"use client"
2+
3+
import Image from "next/image"
4+
import { useRef } from "react"
5+
6+
import { Box, Container, Stack, Typography } from "@mui/material"
7+
8+
import WhySSCR from "@/assets/svgs/defi/why-sSCR.svg?url"
9+
// import Button from "@/components/Button"
10+
import ScrollExpandedBg from "@/components/ScrollExpandedBg"
11+
import SectionHeader from "@/components/SectionHeader"
12+
13+
import data from "./data"
14+
15+
const Explaination = () => {
16+
const wrapperRef = useRef()
17+
18+
return (
19+
<ScrollExpandedBg sx={{ pt: ["6rem", "9.6rem"], pb: ["8rem", "14rem"] }} anchorEl={wrapperRef} fastScrollIn>
20+
<Box ref={wrapperRef}>
21+
<Container>
22+
<SectionHeader
23+
dark
24+
sx={{ mb: ["3.2rem", "12rem"] }}
25+
maxWidth={["100%", "50%"]}
26+
title="Why sSCR"
27+
content="Unlock the potential of SCR whilst engaging with the Scroll ecosystem."
28+
// action={
29+
// <Button className="!w-[19.5rem] sm:!w-[23rem]" href="/ecosystem" color="primary">
30+
// Read more details
31+
// </Button>
32+
// }
33+
></SectionHeader>
34+
<Stack direction={["column-reverse", "column-reverse", "row"]} justifyContent="center" gap={["4.8rem", "14.2rem"]}>
35+
<Stack direction="row" sx={{ flex: 1, justifyContent: ["center", "center", "flex-end"], alignItems: "center" }}>
36+
<Image src={WhySSCR} alt="scr" width="355" height="355" className="w-[24.2rem] sm:w-[35.5rem] h-auto"></Image>
37+
</Stack>
38+
<Stack sx={{ width: ["100%", "100%", "50%"], gap: ["4.8rem", "6.4rem"], justifySelf: "right" }} direction="column">
39+
{data.map(({ icon: IconSvg, title, description }) => (
40+
<Stack key={title} direction="column" spacing="1.6rem">
41+
<IconSvg></IconSvg>
42+
<Typography sx={{ fontSize: ["1.8rem", "2rem"], lineHeight: ["2.4rem", "3.2rem"], fontWeight: 600, color: "primary.contrastText" }}>
43+
{title}
44+
</Typography>
45+
<Typography sx={{ fontSize: ["1.6rem", "2rem"], lineHeight: ["2.4rem", "3.2rem"], color: "primary.contrastText" }}>
46+
{description}
47+
</Typography>
48+
</Stack>
49+
))}
50+
</Stack>
51+
</Stack>
52+
</Container>
53+
</Box>
54+
</ScrollExpandedBg>
55+
)
56+
}
57+
58+
export default Explaination
+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
"use client"
2+
3+
import { Box, Dialog, DialogContent, DialogTitle, Divider, IconButton, SvgIcon, Typography, alpha } from "@mui/material"
4+
5+
import CloseSvg from "@/assets/svgs/bridge/close.svg"
6+
7+
import GetSCRItem from "./GetSCRItem"
8+
import { GER_SCR_DATA } from "./data"
9+
10+
// TODO: common modal
11+
const GetSCRDialog = props => {
12+
const { data, onClose, ...restProps } = props
13+
14+
return (
15+
<Dialog
16+
maxWidth={false}
17+
sx={[
18+
{
19+
"& .MuiBackdrop-root": {
20+
backgroundColor: alpha("#101010", 0.8),
21+
},
22+
"& .MuiDialog-paper": {
23+
width: "54.4rem",
24+
maxWidth: "100%",
25+
padding: "4rem 3.2rem",
26+
borderRadius: "2rem",
27+
},
28+
},
29+
theme => ({
30+
[theme.breakpoints.down("sm")]: {
31+
"& .MuiDialog-paper": {
32+
margin: 0,
33+
borderRadius: 0,
34+
height: "calc(var(--vh, 1vh) * 100)",
35+
maxHeight: "unset",
36+
minWidth: "unset",
37+
width: "100%",
38+
padding: "1.6rem 2rem 2rem",
39+
},
40+
},
41+
}),
42+
]}
43+
{...restProps}
44+
onClose={onClose}
45+
>
46+
<DialogTitle
47+
sx={{
48+
position: "relative",
49+
height: ["3.2rem", "3.6rem"],
50+
fontSize: ["2rem", "2.4rem"],
51+
lineHeight: "3.6rem",
52+
fontWeight: 600,
53+
p: 0,
54+
mb: ["0.8rem", "2.4rem"],
55+
textAlign: "center",
56+
}}
57+
>
58+
<span>Get SCR</span>
59+
<IconButton
60+
sx={{ position: "absolute", right: "-0.8rem", top: ["-0.1rem", "-1.6rem"], "&:hover": { backgroundColor: "unset" } }}
61+
onClick={onClose}
62+
>
63+
<SvgIcon sx={{ fontSize: "1.8rem" }} component={CloseSvg} inheritViewBox></SvgIcon>
64+
</IconButton>
65+
</DialogTitle>
66+
67+
<DialogContent
68+
sx={{
69+
p: 0,
70+
minHeight: "50rem",
71+
"&::-webkit-scrollbar-thumb": {
72+
backgroundColor: "rgba(209, 205, 204, 0.6)",
73+
borderRadius: "8px",
74+
},
75+
"&::-webkit-scrollbar": {
76+
width: "6px",
77+
},
78+
// Firefox
79+
scrollbarWidth: "thin",
80+
scrollbarColor: "rgba(209, 205, 204, 0.6) transparent",
81+
}}
82+
>
83+
<Typography sx={{ fontSize: ["1.4rem", "1.6rem"], lineHeight: ["2rem", "2.4rem"], mb: "2.4rem" }}>
84+
Please verify the validity of these links and ensure you conduct your own research on SCR and the risks that may be involved. Under no
85+
circumstances will we be responsible for any losses you may incur.
86+
</Typography>
87+
{GER_SCR_DATA.map(({ title, data }, index) => (
88+
<>
89+
{!!index && <Divider sx={{ my: ["2.4rem", "3.2rem"], borderColor: "#E9E9E9" }}></Divider>}
90+
<Box key={title}>
91+
<Typography sx={{ fontSize: ["1.6rem", "1.8rem"], lineHeight: "2.4rem", fontWeight: 600 }}>{title}</Typography>
92+
<Box>
93+
{data.map(item => (
94+
<GetSCRItem key={item.name} {...item}></GetSCRItem>
95+
))}
96+
</Box>
97+
</Box>
98+
</>
99+
))}
100+
</DialogContent>
101+
</Dialog>
102+
)
103+
}
104+
105+
export default GetSCRDialog
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import Image from "next/image"
2+
3+
import { Button, Stack, Typography } from "@mui/material"
4+
5+
import ArrowSvg from "@/assets/svgs/ecosystem/arrow.svg"
6+
7+
const GetSCRItem = props => {
8+
const { name, logoURL, href } = props
9+
return (
10+
<Stack sx={{ mt: ["2.4rem", "3.2rem"] }} direction="row" justifyContent="space-between" alignItems="center">
11+
<Stack direction="row" spacing="1.6rem" alignItems="center">
12+
<Image alt={name} src={logoURL} width={48} height={48} className="rounded-[7px]" />
13+
<Typography sx={{ fontSize: ["1.8rem", "2rem"], lineHeight: ["2.4rem", "3.2rem"], fontWeight: 600 }}>{name}</Typography>
14+
</Stack>
15+
<Button
16+
href={href}
17+
sx={{
18+
borderRadius: "0.8rem",
19+
fontSize: ["1.6rem", "1.8rem"],
20+
height: ["4rem", "4rem"],
21+
px: ["2.4rem"],
22+
fontWeight: 600,
23+
}}
24+
target="_blank"
25+
>
26+
Visit <ArrowSvg className="ml-[8px]"></ArrowSvg>
27+
</Button>
28+
</Stack>
29+
)
30+
}
31+
32+
export default GetSCRItem

0 commit comments

Comments
 (0)