Skip to content

Commit b7261d5

Browse files
committed
fix: adaptation
1 parent 27a229b commit b7261d5

9 files changed

Lines changed: 15 additions & 288 deletions

File tree

src/app/SCR-sSCR/Explaination/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import SectionHeader from "@/components/SectionHeader"
1313
import data from "./data"
1414

1515
const Explaination = () => {
16-
const wrapperRef = useRef()
16+
const wrapperRef = useRef<HTMLDivElement>(null)
1717

1818
return (
1919
<ScrollExpandedBg sx={{ pt: ["6rem", "9.6rem"], pb: ["8rem", "14rem"] }} anchorEl={wrapperRef} fastScrollIn>

src/app/_canvas/components/Tooltip/index.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ const ToolTip = props => {
1212
disableFocusListener={!isDesktop}
1313
disableTouchListener={!isDesktop}
1414
followCursor
15-
PopperProps={{
16-
popperOptions: {
15+
slotProps={{
16+
popper: {
1717
modifiers: [
1818
{
1919
name: "offset",
@@ -29,8 +29,6 @@ const ToolTip = props => {
2929
},
3030
],
3131
},
32-
}}
33-
slotProps={{
3432
tooltip: {
3533
sx: {
3634
[`&.${tooltipClasses.tooltip}`]: {

src/app/developer-nft/coming-soon/Stepper/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const NFTStepper = () => {
9191
labelContainer: classes.stepLabelContainer,
9292
label: classes.stepLabelText,
9393
}}
94-
StepIconComponent={PhraseStepIcon}
94+
slots={{ stepIcon: PhraseStepIcon }}
9595
optional={
9696
// TODO: NumberTypography not allow component="span"
9797
<Typography

src/app/layout.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Metadata } from "next"
33
import React, { Suspense } from "react"
44

55
import { AppRouterCacheProvider } from "@mui/material-nextjs/v15-appRouter"
6+
import InitColorSchemeScript from "@mui/material/InitColorSchemeScript"
67

78
import GlobalComponents from "@/components/GlobalComponents"
89
// import GoogleAnalytics from "@/components/GoogleAnalytics"
@@ -21,13 +22,14 @@ export const metadata: Metadata = ROOT_METADATA
2122

2223
export default function RootLayout({ children }: { children: React.ReactNode }) {
2324
return (
24-
<html lang="en">
25+
<html lang="en" suppressHydrationWarning>
2526
<head>
2627
<link rel="preconnect" href={process.env.NEXT_PUBLIC_API_BASE_URI} crossOrigin="anonymous" />
2728
<link rel="dns-prefetch" href={process.env.NEXT_PUBLIC_API_BASE_URI} crossOrigin="anonymous" />
2829
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap" rel="stylesheet" />
2930
</head>
3031
<body>
32+
<InitColorSchemeScript attribute="class"></InitColorSchemeScript>
3133
<AppRouterCacheProvider options={{ key: "css" }}>
3234
<ScrollThemeProvider>
3335
<VersionChecker>

src/app/scrETH/Explaination/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import SectionHeader from "@/components/SectionHeader"
1313
import data from "./data"
1414

1515
const Explaination = () => {
16-
const wrapperRef = useRef()
16+
const wrapperRef = useRef<HTMLDivElement>(null)
1717

1818
return (
1919
<ScrollExpandedBg sx={{ pt: ["6.4rem", "9.6rem"], pb: ["8rem", "14rem"] }} anchorEl={wrapperRef} fastScrollIn>

src/app/sessions/Header/TotalMarks.tsx

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

33
import { useQuery } from "@tanstack/react-query"
4-
import { motion } from "framer-motion"
4+
import { motion } from "motion/react"
55

66
import { Box, Divider, Skeleton, Stack, Typography } from "@mui/material"
77

@@ -115,9 +115,7 @@ const TotalPoints = () => {
115115
How does this work
116116
</Typography>
117117
<QATooltip title="Providing liquidity in listed DEXs boosts your accrual rate. The more useful and volatile your liquidity pair, the higher the boost. Additional boosts will be introduced by Scroll’s upcoming LRTs soon.">
118-
<span className="text-[0] cursor-pointer">
119-
<QaSvg></QaSvg>
120-
</span>
118+
<QaSvg className="cursor-pointer"></QaSvg>
121119
</QATooltip>
122120
</Stack>
123121
<Typography></Typography>

src/app/sessions/Protocols/ProtocolSection.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ const ProtocolSection = (props: ProtocolSectionProps) => {
4242
<span>{tag}</span>
4343
{!!PROTOCOL_MARKS_TOOLTIP_MAP[title] && (
4444
<QATooltip disabled={!PROTOCOL_MARKS_TOOLTIP_MAP[title]} title={PROTOCOL_MARKS_TOOLTIP_MAP[title]}>
45-
<span className="text-[0] cursor-pointer">
46-
<QaSvg className="w-[1.6rem]"></QaSvg>
47-
</span>
45+
<QaSvg className="w-[1.6rem] cursor-pointer"></QaSvg>
4846
</QATooltip>
4947
)}
5048
</Stack>

src/app/sessions/TotalMarks/index.tsx

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

src/theme/index.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22

33
// @ts-ignore
44
import { ThemeProvider, createTheme } from "@mui/material/styles"
5-
import { getInitColorSchemeScript } from "@mui/material/styles"
65

76
// import darkTheme from "./dark"
87
import lightTheme from "./light"
98

109
const ScrollThemeProvider = ({ children }) => {
1110
const theme = createTheme({
12-
cssVariables: true,
11+
cssVariables: {
12+
colorSchemeSelector: "class",
13+
},
1314
colorSchemes: {
1415
light: lightTheme,
1516
dark: lightTheme,
@@ -18,11 +19,7 @@ const ScrollThemeProvider = ({ children }) => {
1819

1920
// not use StyledEngineProvider, so mui style > tailwind style
2021
return (
21-
<ThemeProvider theme={theme}>
22-
{getInitColorSchemeScript({
23-
// colorSchemeStorageKey: "mui-mode",
24-
// defaultMode: "system",
25-
})}
22+
<ThemeProvider disableTransitionOnChange theme={theme}>
2623
{children}
2724
</ThemeProvider>
2825
)

0 commit comments

Comments
 (0)