Skip to content

Commit b86453d

Browse files
committed
fix: community
1 parent 20d2240 commit b86453d

File tree

8 files changed

+41
-46
lines changed

8 files changed

+41
-46
lines changed

src/app/community/Join/CardLarge.tsx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
import Image from "next/image"
12
import { makeStyles } from "tss-react/mui"
23

34
import { Box, Button, Card, Stack, SvgIcon, Typography } from "@mui/material"
45

6+
import ScrollGenericIcon from "@/assets/images/community/scroll_generic.png"
57
import CombinationMarkIcon from "@/assets/svgs/community/combination_mark.svg"
6-
import ScrollGenericIcon from "@/assets/svgs/community/scroll_generic.svg"
78
import ArrowSvg from "@/assets/svgs/ecosystem/arrow.svg"
89

910
const useStyles = makeStyles()(theme => ({
@@ -34,6 +35,14 @@ const useStyles = makeStyles()(theme => ({
3435
marginBottom: "3.3rem",
3536
},
3637
},
38+
genericIcon: {
39+
maxHeight: "22rem",
40+
width: "auto",
41+
[theme.breakpoints.down("sm")]: {
42+
height: "auto",
43+
width: "100%",
44+
},
45+
},
3746
}))
3847

3948
const CardLarge = props => {
@@ -43,7 +52,7 @@ const CardLarge = props => {
4352

4453
return (
4554
<Card {...restProps} elevation={0} classes={{ root: classes.card }}>
46-
<Stack direction="row" justifyContent="space-between" position="relative">
55+
<Stack direction={["column", "row"]} justifyContent="space-between" position="relative">
4756
<Box>
4857
<SvgIcon
4958
sx={{
@@ -85,8 +94,8 @@ const CardLarge = props => {
8594
Visit Level Up Site
8695
</Button>
8796
</Box>
88-
<Box sx={{ justifySelf: "flex-end", position: ["absolute", "unset"], right: "-1.3rem", bottom: "-0.8rem" }}>
89-
<SvgIcon sx={{ height: ["10rem", "100%"], width: ["auto", "auto"] }} component={ScrollGenericIcon} inheritViewBox></SvgIcon>
97+
<Box sx={{ justifySelf: "flex-end", alignSelf: "end" }}>
98+
<Image src={ScrollGenericIcon} className={classes.genericIcon} alt="Scroll Generic Icon" />
9099
</Box>
91100
</Stack>
92101
</Card>

src/app/layout.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Metadata } from "next"
2-
import React from "react"
2+
import React, { Suspense } from "react"
33

44
import { AppRouterCacheProvider } from "@mui/material-nextjs/v14-appRouter"
55

@@ -43,7 +43,9 @@ export default function RootLayout({ children }: { children: React.ReactNode })
4343
</AppRouterCacheProvider>
4444
{process.env.NODE_ENV === "production" && (
4545
<>
46-
<GoogleAnalytics></GoogleAnalytics>
46+
<Suspense fallback={null}>
47+
<GoogleAnalytics></GoogleAnalytics>
48+
</Suspense>
4749
<WebVitals></WebVitals>
4850
{/* <SentrySetting></SentrySetting> */}
4951
</>
133 KB
Loading

src/assets/svgs/community/combination_mark.svg

Lines changed: 12 additions & 23 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

src/assets/svgs/community/scroll_generic.svg

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/components/GoogleAnalytics/index.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client"
22

3-
import { usePathname } from "next/navigation"
3+
import { usePathname, useSearchParams } from "next/navigation"
44
import { useEffect } from "react"
55
import { isMobile } from "react-device-detect"
66
import ReactGA from "react-ga4"
@@ -15,19 +15,20 @@ if (process.env.NODE_ENV === "production" && isMainnet) {
1515
customBrowserType: !isMobile ? "desktop" : "web3" in window || "ethereum" in window ? "mobileWeb3" : "mobileRegular",
1616
})
1717
ReactGA.event("web_version", {
18-
version: process.env.NEXT_PUBLIC_APP_VERSION,
18+
version: process.env.NEXT_PUBLIC_VERSION,
1919
})
2020
}
2121

2222
// gtagOptions https://developers.google.com/analytics/devguides/collection/ga4/reference/config#send_page_view
2323

2424
const GoogleAnalytics = () => {
2525
const pathname = usePathname()
26+
const searchParams = useSearchParams()
2627
useEffect(() => {
2728
if (pathname) {
28-
ReactGA.send({ hitType: "pageview", page: pathname })
29+
ReactGA.send({ hitType: "pageview", page: `${pathname}?${searchParams}` })
2930
}
30-
}, [pathname])
31+
}, [pathname, searchParams])
3132

3233
return null
3334
}

src/constants/community.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import ContributeIcon from "@/assets/svgs/community/contribute.svg"
22
import DiscordIcon from "@/assets/svgs/community/discord.svg"
3-
import ForumIcon from "@/assets/svgs/community/forum.svg"
3+
import GovernanceIcon from "@/assets/svgs/community/governance.svg"
44

55
export const DISCORD_LINK = "https://discord.gg/scroll"
6-
export const COMMUNITY_FORUM_LINK = "https://gov.scroll.io/forum"
6+
export const COMMUNITY_FORUM_LINK = "https://gov.scroll.io/info"
77
export const CONTRIBUTE_TO_SCROLL_LINK = "https://github.com/scroll-tech/contribute-to-scroll"
88

99
export const COMMUNITY_EXPLORER_LIST = [
@@ -14,9 +14,9 @@ export const COMMUNITY_EXPLORER_LIST = [
1414
content: "Connect with other Scroll developers and users",
1515
},
1616
{
17-
icon: ForumIcon,
17+
icon: GovernanceIcon,
1818
href: COMMUNITY_FORUM_LINK,
19-
title: "Governance Forum",
19+
title: "Go to Governance",
2020
content: "Discuss and propose changes to Scroll",
2121
},
2222
{

0 commit comments

Comments
 (0)