11import { usePathname } from "next/navigation"
22import { useMemo } from "react"
3+ import Marquee from "react-fast-marquee"
34
4- import { Stack } from "@mui/material"
5- import { styled } from "@mui/system"
5+ import { Box } from "@mui/material"
66
77import { isMainnet } from "@/utils"
88
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-
239const Announcement = ( ) => {
24- const displayAnnouncement = false
10+ const displayAnnouncement = true
2511 const pathname = usePathname ( )
26-
2712 const isHome = pathname === "/"
2813
2914 const announcementContent = useMemo ( ( ) => {
3015 if ( isMainnet && isHome ) {
3116 return (
3217 < >
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 >
3422 </ >
3523 )
3624 }
@@ -39,14 +27,32 @@ const Announcement = () => {
3927
4028 const rightHref = useMemo ( ( ) => {
4129 if ( isMainnet && isHome ) {
42- return "https://tally.so/r/mYdQP5 "
30+ return "https://open.scroll.io "
4331 }
4432 return ""
4533 } , [ isMainnet , isHome ] )
4634
4735 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 >
5056 </ a >
5157 ) : null
5258}
0 commit comments