From e208889d4c05842bbd8eff035b8a027d4178baa2 Mon Sep 17 00:00:00 2001 From: holybasil Date: Thu, 24 Oct 2024 08:44:38 +0800 Subject: [PATCH 1/2] fix: add governance menu --- src/assets/svgs/header/Forum.svg | 7 +++++ src/assets/svgs/header/Home.svg | 3 ++ src/components/Header/SubmenuLink.tsx | 2 +- src/components/Header/constants.ts | 40 ++++++++++++++++++++++++ src/components/Header/desktop_header.tsx | 9 ++++-- src/components/Header/mobile_header.tsx | 18 ++++++++++- 6 files changed, 75 insertions(+), 4 deletions(-) create mode 100644 src/assets/svgs/header/Forum.svg create mode 100644 src/assets/svgs/header/Home.svg diff --git a/src/assets/svgs/header/Forum.svg b/src/assets/svgs/header/Forum.svg new file mode 100644 index 00000000..f9a8c988 --- /dev/null +++ b/src/assets/svgs/header/Forum.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/assets/svgs/header/Home.svg b/src/assets/svgs/header/Home.svg new file mode 100644 index 00000000..2adab7ec --- /dev/null +++ b/src/assets/svgs/header/Home.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/Header/SubmenuLink.tsx b/src/components/Header/SubmenuLink.tsx index b575986b..336f704d 100644 --- a/src/components/Header/SubmenuLink.tsx +++ b/src/components/Header/SubmenuLink.tsx @@ -67,7 +67,7 @@ const SubmenuLinkContent = ({ icon, label, text, isExternal }: { icon: any; labe {icon && } {text && {text}} - {label} + {label} {isExternal && ( { handleMouseEnter(e, item.key)} onMouseLeave={handleMouseLeave} > {item.label} + {item.new && ( + + NEW + + )} diff --git a/src/components/Header/mobile_header.tsx b/src/components/Header/mobile_header.tsx index de7efba3..f3c7eb98 100644 --- a/src/components/Header/mobile_header.tsx +++ b/src/components/Header/mobile_header.tsx @@ -148,7 +148,23 @@ const App = ({ currentMenu }) => { sx={{ py: "1rem" }} onClick={() => toggleCollapse(item.key)} > - {item.label} + + {item.label} + {item.new && ( + + NEW + + )} + + ) : ( toggleDrawer(false)}> From 241d31dc519696e3b965cd984bafca31a2e3e894 Mon Sep 17 00:00:00 2001 From: holybasil Date: Mon, 21 Oct 2024 09:27:12 +0800 Subject: [PATCH 2/2] fix: community form link --- src/constants/community.ts | 17 ++++++++--------- src/pages/community/Join/index.tsx | 4 ++-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/constants/community.ts b/src/constants/community.ts index 0288f738..5cdf5138 100644 --- a/src/constants/community.ts +++ b/src/constants/community.ts @@ -1,10 +1,9 @@ import { ReactComponent as ContributeIcon } from "@/assets/svgs/community/contribute.svg" import { ReactComponent as DiscordIcon } from "@/assets/svgs/community/discord.svg" - -// import { ReactComponent as ForumIcon } from "@/assets/svgs/community/forum.svg" +import { ReactComponent as ForumIcon } from "@/assets/svgs/community/forum.svg" export const DISCORD_LINK = "https://discord.gg/scroll" -export const COMMUNITY_FORUM_LINK = "https://community.scroll.io/" +export const COMMUNITY_FORUM_LINK = "https://gov.scroll.io/forum" export const CONTRIBUTE_TO_SCROLL_LINK = "https://github.com/scroll-tech/contribute-to-scroll" export const COMMUNITY_EXPLORER_LIST = [ @@ -14,12 +13,12 @@ export const COMMUNITY_EXPLORER_LIST = [ title: "Join our Discord", content: "Connect with other Scroll developers and users", }, - // { - // icon: ForumIcon, - // href: COMMUNITY_FORUM_LINK, - // title: "Community Forum", - // content: "Discuss and propose changes to Scroll", - // }, + { + icon: ForumIcon, + href: COMMUNITY_FORUM_LINK, + title: "Governance Forum", + content: "Discuss and propose changes to Scroll", + }, { icon: ContributeIcon, href: CONTRIBUTE_TO_SCROLL_LINK, diff --git a/src/pages/community/Join/index.tsx b/src/pages/community/Join/index.tsx index a0ad04f3..e444cb94 100644 --- a/src/pages/community/Join/index.tsx +++ b/src/pages/community/Join/index.tsx @@ -13,7 +13,7 @@ const useStyles = makeStyles()(theme => ({ flex: { marginTop: "4.8rem", display: "grid", - gridTemplateColumns: "repeat(2, 1fr)", + gridTemplateColumns: "repeat(3, 1fr)", gridGap: "3rem", [theme.breakpoints.down("md")]: { gridTemplateColumns: "100%", @@ -22,7 +22,7 @@ const useStyles = makeStyles()(theme => ({ }, }, large: { - gridColumn: "span 2", + gridColumn: "span 3", [theme.breakpoints.down("md")]: { gridColumn: "span 1", },