Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/canvas.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Check for compliance with predefined minting rules set by your platform. These r

A scrolly can be placed in the corner of the page to remind the user to mint a badge.
![Canvas on Bridge](https://github.com/user-attachments/assets/3b8445f5-8890-453f-b92c-4834dad5846c)
[Reference code](https://github.com/scroll-tech/frontends/blob/mainnet/src/pages/bridge/components/MintBadge/index.tsx)
[Reference code](https://github.com/scroll-tech/frontends/blob/sepolia/src/app/bridge/components/MintBadge/index.tsx)

After clicking the button, there are two ways to show the badge introduction:

Expand All @@ -31,7 +31,7 @@ After clicking the button, there are two ways to show the badge introduction:
[Reference code](https://github.com/scroll-tech/frontends/blob/mainnet/src/pages/canvas/badgeContract/index.tsx)
- Show a mint pop-up displaying badge introduction
![BadgeDetailDialog](https://github.com/user-attachments/assets/8a664aa2-9d17-4f38-a170-11bb0f413e20)
[Reference code](https://github.com/scroll-tech/frontends/blob/mainnet/src/pages/canvas/Dashboard/BadgeDetailDialog/index.tsx)
[Reference code](https://github.com/scroll-tech/frontends/blob/sepolia/src/app/_canvas/Dashboard/BadgeDetailDialog/index.tsx)

##### Main actions:

Expand Down Expand Up @@ -67,7 +67,7 @@ After minting successfully,
[Reference code](https://github.com/scroll-tech/frontends/blob/mainnet/src/pages/canvas/badge/index.tsx)

- Only display a success notification.
[Reference code](https://github.com/scroll-tech/frontends/blob/mainnet/src/pages/canvas/Dashboard/BadgeDetailDialog/index.tsx#L121)
[Reference code](https://github.com/scroll-tech/frontends/blob/sepolia/src/app/_canvas/Dashboard/BadgeDetailDialog/index.tsx#L121)

## Conclusion

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 2 additions & 5 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import GlobalComponents from "@/components/GlobalComponents"
import ScrollToTop from "@/components/ScrollToTop"
import WebVitals from "@/components/WebVitals"
import { ROOT_METADATA } from "@/constants/route"
import BridgeContextProvider from "@/contexts/BridgeContextProvider"
import RainbowProvider from "@/contexts/RainbowProvider"
import { VersionChecker } from "@/hooks/useVersionCheck"
import ScrollThemeProvider from "@/theme"
Expand Down Expand Up @@ -70,10 +69,8 @@ export default function RootLayout({ children }: { children: React.ReactNode })
<ScrollThemeProvider>
<VersionChecker>
<RainbowProvider>
<BridgeContextProvider>
{children}
<GlobalComponents></GlobalComponents>
</BridgeContextProvider>
{children}
<GlobalComponents></GlobalComponents>
</RainbowProvider>
</VersionChecker>
<ScrollToTop />
Expand Down
3 changes: 0 additions & 3 deletions src/app/sitemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@ export default function sitemap(): MetadataRoute.Sitemap {
{ url: "https://scroll.io/developer-nft", changeFrequency: "monthly", priority: 0.6 },
{ url: "https://scroll.io/developer-nft/mint", changeFrequency: "monthly", priority: 0.6 },
{ url: "https://scroll.io/sessions", changeFrequency: "weekly", priority: 0.7 },
{ url: "https://scroll.io/SCR-sSCR", changeFrequency: "weekly", priority: 0.6 },
{ url: "https://scroll.io/scrETH", changeFrequency: "weekly", priority: 0.6 },
{ url: "https://scroll.io/community", changeFrequency: "monthly", priority: 0.6 },

{ url: "https://scroll.io/airdrop-faq", changeFrequency: "monthly", priority: 0.4 },
{ url: "https://scroll.io/bridge/faq", changeFrequency: "monthly", priority: 0.4 },
{ url: "https://scroll.io/sessions-terms-of-use", changeFrequency: "monthly", priority: 0.4 },

{ url: "https://scroll.io/terms-of-service", changeFrequency: "yearly", priority: 0.4 },
Expand Down
9 changes: 1 addition & 8 deletions src/components/GlobalComponents/index.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
import { isDesktop } from "react-device-detect"

import TxHistoryDialog from "@/app/bridge/TxHistoryDialog"

import AIModal from "../AIModal"

const GlobalComponents = () => {
return (
<>
<TxHistoryDialog></TxHistoryDialog>
{isDesktop && <AIModal></AIModal>}
</>
)
return <>{isDesktop && <AIModal></AIModal>}</>
}

export default GlobalComponents
4 changes: 0 additions & 4 deletions src/components/Header/mobile_header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ import { styled } from "@mui/system"

import Link from "@/components/Link"
import WalletToolkit from "@/components/WalletToolkit"
import useShowLanguageSelect from "@/hooks/useShowLanguageSelect"
import useShowWalletConnector from "@/hooks/useShowWalletToolkit"
import { isSepolia } from "@/utils"

import Logo from "../ScrollLogo"
import AskAI from "./AskAI"
import MenuItem from "./MenuItem"
import MobileGasPriceViewer from "./MobileGasPriceViewer"
import MobileNavbarItem from "./MobileNavBarItem"
Expand All @@ -30,7 +28,6 @@ const Bar = styled<any>("div", { shouldForwardProp: prop => prop !== "dark" })((
const MobileHeader = ({ currentMenu }) => {
useCheckCustomNavBarBg()
const showWalletConnector = useShowWalletConnector()
const showLanguageSelect = useShowLanguageSelect()

const dark = useCheckTheme()
const [open, setOpen] = useState(false)
Expand Down Expand Up @@ -181,7 +178,6 @@ const MobileHeader = ({ currentMenu }) => {
<Box sx={{ margin: "-0.8rem 2rem 0" }}>
{renderList()}
{!isSepolia && <MobileGasPriceViewer dark={dark}></MobileGasPriceViewer>}
{/* {!isSepolia && <AskAI isMobile></AskAI>} */}
</Box>
</Box>
)}
Expand Down
15 changes: 1 addition & 14 deletions src/components/WalletToolkit/WalletDropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
import copy from "copy-to-clipboard"
import { usePathname } from "next/navigation"
import { useCallback, useMemo, useState } from "react"
import { makeStyles } from "tss-react/mui"

import { ButtonBase, Fade, ListItemIcon, ListItemText, Menu, MenuItem } from "@mui/material"

import CopySuccessSvg from "@/assets/svgs/bridge/copy-success.svg"
import HistorySvg from "@/assets/svgs/bridge/history.svg"
import BlockSvg from "@/assets/svgs/wallet-connector/block.svg"
import CopySvg from "@/assets/svgs/wallet-connector/copy.svg"
import DisconnectSvg from "@/assets/svgs/wallet-connector/disconnect.svg"
import DownTriangleSvg from "@/assets/svgs/wallet-connector/down-triangle.svg"
import { CHAIN_ID, EXPLORER_URL } from "@/constants"
import { useRainbowContext } from "@/contexts/RainbowProvider"
import useBridgeStore from "@/stores/bridgeStore"
import { generateExploreLink, truncateAddress } from "@/utils"

const useStyles = makeStyles<any>()((theme, { dark }) => ({
Expand Down Expand Up @@ -79,10 +76,8 @@ const useStyles = makeStyles<any>()((theme, { dark }) => ({
const WalletDropdown = props => {
const { sx, dark } = props
const { classes, cx } = useStyles({ dark })
const pathname = usePathname()

const { walletCurrentAddress, connect, disconnect, chainId } = useRainbowContext()
const { changeHistoryVisible } = useBridgeStore()

const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null)
const [copied, setCopied] = useState(false)
Expand All @@ -109,14 +104,6 @@ const WalletDropdown = props => {

const operations = useMemo(
() => [
{
icon: HistorySvg,
label: "Transaction history",
action: () => {
changeHistoryVisible(true)
handleClose()
},
},
{
icon: BlockSvg,
label: "Block explorer",
Expand All @@ -133,7 +120,7 @@ const WalletDropdown = props => {
},
},
],
[pathname, viewScan, copyAddress, copied, disconnect],
[viewScan, copyAddress, copied, disconnect],
)

const renderCurrentWallet = () => {
Expand Down
32 changes: 0 additions & 32 deletions src/hooks/useLastFinalizedBatchIndex.tsx

This file was deleted.

6 changes: 1 addition & 5 deletions src/hooks/useShowWalletToolkit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ import { useMemo } from "react"
const useShowWalletConnector = () => {
const pathname = usePathname()

const showWalletConnector = useMemo(
() => pathname.startsWith("/developer-nft") || pathname.startsWith("/bridge") || pathname.startsWith("/sessions"),
// () => !pathname.startsWith("/blog"),
[pathname],
)
const showWalletConnector = useMemo(() => pathname.startsWith("/developer-nft"), [pathname])
return showWalletConnector
}

Expand Down