Skip to content

Commit 9b5fba6

Browse files
committed
chore: re-org css and fix incorrectly nested provider
1 parent b885a86 commit 9b5fba6

File tree

6 files changed

+72
-69
lines changed

6 files changed

+72
-69
lines changed

apps/_root/pages/_app.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import '@sushiswap/ui/index.css'
2-
import '../variables.css'
3-
import '../styles/index.css'
4-
import { App, ThemeProvider } from '@sushiswap/ui'
2+
import '../varaibles.css'
3+
import { App } from '@sushiswap/ui'
54
import { Analytics } from '@vercel/analytics/react'
65
import type { AppProps } from 'next/app'
76
import Head from 'next/head'

apps/_root/pages/index.tsx

+45-20
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,52 @@ const Index = () => {
1717
const isSmallScreen = useIsSmScreen()
1818

1919
return (
20-
<ThemeProvider forcedTheme="dark">
21-
<Header />
22-
<MotionConfig reducedMotion={isSmallScreen ? 'always' : 'user'}>
23-
<article className="my-20 w-full">
24-
<Hero />
25-
<Stats />
26-
27-
<div className="bg-black overflow-x-hidden">
28-
<Partners />
29-
<Story />
30-
<div className="flex flex-col gap-2 border-t border-neutral-200/10">
31-
<BuildWealth />
32-
<Ecosystem />
33-
<BuildFuture />
34-
<NeedHelp />
20+
<>
21+
<ThemeProvider forcedTheme="dark">
22+
<Header />
23+
<MotionConfig reducedMotion={isSmallScreen ? 'always' : 'user'}>
24+
<article className="my-20 w-full">
25+
<Hero />
26+
<Stats />
27+
28+
<div className="bg-black overflow-x-hidden">
29+
<Partners />
30+
<Story />
31+
<div className="flex flex-col gap-2 border-t border-neutral-200/10">
32+
<BuildWealth />
33+
<Ecosystem />
34+
<BuildFuture />
35+
<NeedHelp />
36+
</div>
3537
</div>
36-
</div>
37-
</article>
38-
</MotionConfig>
39-
<App.Footer />
40-
</ThemeProvider>
38+
</article>
39+
</MotionConfig>
40+
<App.Footer />
41+
</ThemeProvider>
42+
<style global jsx>{`
43+
html {
44+
background-color: black !important;
45+
/* color: white; */
46+
}
47+
48+
button:focus {
49+
outline: none !important;
50+
}
51+
52+
input:focus {
53+
box-shadow: none !important;
54+
}
55+
56+
.no-scrollbar::-webkit-scrollbar {
57+
display: none;
58+
}
59+
60+
.no-scrollbar {
61+
-ms-overflow-style: none; /* IE and Edge */
62+
scrollbar-width: none; /* Firefox */
63+
}
64+
`}</style>
65+
</>
4166
)
4267
}
4368

apps/_root/pages/swap/index.tsx

+8-8
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ import { ThemeProvider } from '@sushiswap/ui'
1515

1616
export const Page: FC = () => {
1717
return (
18-
<TokenProvider>
19-
<SplashController>
20-
<SwapProvider>
21-
<ThemeProvider>
18+
<ThemeProvider>
19+
<TokenProvider>
20+
<SplashController>
21+
<SwapProvider>
2222
<Onramper.Provider>
2323
<Header />
2424
<Container maxWidth={520} className="p-4 mx-auto mt-16 mb-[86px] flex flex-col gap-4">
@@ -35,10 +35,10 @@ export const Page: FC = () => {
3535
<div className="h-[68px] w-full" />
3636
</Container>
3737
</Onramper.Provider>
38-
</ThemeProvider>
39-
</SwapProvider>
40-
</SplashController>
41-
</TokenProvider>
38+
</SwapProvider>
39+
</SplashController>
40+
</TokenProvider>
41+
</ThemeProvider>
4242
)
4343
}
4444

apps/_root/styles/index.css

-21
This file was deleted.

apps/_root/varaibles.css

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
:root,
2+
::before,
3+
::after {
4+
--font-sans: 'Inter Variable', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu',
5+
'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
6+
color-scheme: dark;
7+
--background-color: #0f172a;
8+
--color: #ffffff;
9+
}
10+
11+
@media (prefers-color-scheme: dark) {
12+
:root {
13+
color-scheme: dark;
14+
--background-color: #0f172a;
15+
--color: #ffffff;
16+
}
17+
}

apps/_root/variables.css

-17
This file was deleted.

0 commit comments

Comments
 (0)