1
1
import { usePathname } from "next/navigation"
2
2
import { useMemo } from "react"
3
+ import Marquee from "react-fast-marquee"
3
4
4
- import { Stack } from "@mui/material"
5
- import { styled } from "@mui/system"
5
+ import { Box } from "@mui/material"
6
6
7
7
import { isMainnet } from "@/utils"
8
8
9
- const AnnouncementStack = styled < any > ( Stack , { shouldForwardProp : prop => prop !== "production" } ) ( ( { theme, production } ) => ( {
10
- lineHeight : "2.6rem" ,
11
- background : production ? "rgb(181, 245, 236)" : theme . palette . primary . main ,
12
- textAlign : "center" ,
13
- color : production ? theme . palette . text . primary : theme . palette . primary . contrastText ,
14
- fontSize : "1.6rem" ,
15
- padding : "1.2rem" ,
16
- display : "inline-block" ,
17
- width : "100%" ,
18
- [ theme . breakpoints . down ( "sm" ) ] : {
19
- lineHeight : "2rem" ,
20
- } ,
21
- } ) )
22
-
23
9
const Announcement = ( ) => {
24
- const displayAnnouncement = false
10
+ const displayAnnouncement = true
25
11
const pathname = usePathname ( )
26
-
27
12
const isHome = pathname === "/"
28
13
29
14
const announcementContent = useMemo ( ( ) => {
30
15
if ( isMainnet && isHome ) {
31
16
return (
32
17
< >
33
- 🔥 Applications for the Level Up Grants Program are open until August 25. < strong className = "underline" > Apply now!</ strong >
18
+ Join Scroll Open: Build the Future of the Open Economy{ " " }
19
+ < div className = "inline-block w-[5px] h-[5px] rounded-full bg-current mx-[20px] align-middle" > </ div >
20
+ Jan 27 - March 17
21
+ < div className = "inline-block w-[5px] h-[5px] rounded-full bg-current mx-[20px] align-middle" > </ div >
34
22
</ >
35
23
)
36
24
}
@@ -39,14 +27,32 @@ const Announcement = () => {
39
27
40
28
const rightHref = useMemo ( ( ) => {
41
29
if ( isMainnet && isHome ) {
42
- return "https://tally.so/r/mYdQP5 "
30
+ return "https://open.scroll.io "
43
31
}
44
32
return ""
45
33
} , [ isMainnet , isHome ] )
46
34
47
35
return displayAnnouncement && announcementContent ? (
48
- < a href = { rightHref } rel = "noopener noreferrer" >
49
- < AnnouncementStack production = { isMainnet } > { announcementContent } </ AnnouncementStack >
36
+ < a href = { rightHref } rel = "noopener noreferrer" className = "mb-[1.6rem]" >
37
+ < Box
38
+ sx = { {
39
+ backgroundColor : theme => ( isMainnet ? theme . palette . common . white : theme . palette . primary . main ) ,
40
+ color : theme => ( isMainnet ? theme . palette . text . primary : theme . palette . primary . contrastText ) ,
41
+ fontSize : "1.6rem" ,
42
+ lineHeight : {
43
+ xs : "2rem" ,
44
+ sm : "2.6rem" ,
45
+ } ,
46
+ padding : "1.6rem" ,
47
+ width : "100%" ,
48
+ borderBottom : "1px solid #101010" ,
49
+ fontWeight : "500" ,
50
+ } }
51
+ >
52
+ < Marquee autoFill pauseOnHover gradient = { false } >
53
+ { announcementContent }
54
+ </ Marquee >
55
+ </ Box >
50
56
</ a >
51
57
) : null
52
58
}
0 commit comments