Skip to content

Commit a018c54

Browse files
committed
Dashboard: Completely remove Chakra UI
1 parent 4f77138 commit a018c54

File tree

20 files changed

+168
-2147
lines changed

20 files changed

+168
-2147
lines changed

apps/dashboard/.eslintrc.js

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@ module.exports = {
1010
"plugin:storybook/recommended",
1111
],
1212
overrides: [
13-
// disable restricted imports in chakra
14-
{
15-
files: "src/chakra/**/*",
16-
rules: {
17-
"no-restricted-imports": ["off"],
18-
},
19-
},
2013
// allow direct PostHog imports inside analytics helpers
2114
{
2215
files: "src/@/analytics/**/*",
@@ -91,60 +84,6 @@ module.exports = {
9184
"error",
9285
{
9386
paths: [
94-
{
95-
// these are provided by chakra folder, so we don't want to import them from chakra directly
96-
importNames: [
97-
"Card",
98-
"Button",
99-
"Checkbox",
100-
"Badge",
101-
"Drawer",
102-
"Heading",
103-
"Text",
104-
"FormLabel",
105-
"FormHelperText",
106-
"FormErrorMessage",
107-
"MenuGroup",
108-
"VStack",
109-
"HStack",
110-
"AspectRatio",
111-
"useToast",
112-
"useClipboard",
113-
"Badge",
114-
"Stack",
115-
// also the types
116-
"ButtonProps",
117-
"BadgeProps",
118-
"DrawerProps",
119-
"HeadingProps",
120-
"TextProps",
121-
"FormLabelProps",
122-
"HelpTextProps",
123-
"MenuGroupProps",
124-
"MenuItemProps",
125-
"AspectRatioProps",
126-
"BadgeProps",
127-
"StackProps",
128-
],
129-
message:
130-
'import component from "chakra" folder instead if you have to use chakra component, But use shadcn component otherwise',
131-
name: "@chakra-ui/react",
132-
},
133-
{
134-
message:
135-
"Import from `@chakra-ui/react` instead of `@chakra-ui/layout`.",
136-
name: "@chakra-ui/layout",
137-
},
138-
{
139-
message:
140-
"Import from `@chakra-ui/react` instead of `@chakra-ui/button`.",
141-
name: "@chakra-ui/button",
142-
},
143-
{
144-
message:
145-
"Import from `@chakra-ui/react` instead of `@chakra-ui/menu`.",
146-
name: "@chakra-ui/menu",
147-
},
14887
{
14988
importNames: ["useRouter"],
15089
message:

apps/dashboard/.storybook/main.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@ const config: StorybookConfig = {
2020
name: getAbsolutePath("@storybook/nextjs"),
2121
options: {},
2222
},
23-
refs: {
24-
"@chakra-ui/react": {
25-
disable: true,
26-
},
27-
},
2823
staticDirs: ["../public"],
2924
features: {
3025
experimentalRSC: true,

apps/dashboard/next.config.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,6 @@ const SENTRY_OPTIONS: SentryBuildOptions = {
115115
const FRAMER_ADDITIONAL_LANGUAGES = ["es"];
116116

117117
const baseNextConfig: NextConfig = {
118-
compiler: {
119-
emotion: true,
120-
},
121118
eslint: {
122119
ignoreDuringBuilds: true,
123120
},

apps/dashboard/package.json

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
{
22
"dependencies": {
3-
"@chakra-ui/react": "^2.8.2",
4-
"@chakra-ui/styled-system": "^2.9.2",
5-
"@chakra-ui/theme-tools": "^2.1.2",
6-
"@emotion/react": "11.14.0",
7-
"@emotion/styled": "11.14.1",
83
"@hookform/resolvers": "^3.9.1",
94
"@marsidev/react-turnstile": "^1.1.0",
105
"@radix-ui/react-accordion": "^1.2.11",
@@ -36,11 +31,9 @@
3631
"abitype": "1.0.8",
3732
"class-variance-authority": "^0.7.1",
3833
"clsx": "^2.1.1",
39-
"color": "5.0.0",
4034
"compare-versions": "^6.1.0",
4135
"date-fns": "4.1.0",
4236
"fast-xml-parser": "^5.2.5",
43-
"framer-motion": "12.23.0",
4437
"fuse.js": "7.1.0",
4538
"input-otp": "^1.4.1",
4639
"ioredis": "^5.6.1",
@@ -85,7 +78,6 @@
8578
},
8679
"devDependencies": {
8780
"@biomejs/biome": "2.0.6",
88-
"@chakra-ui/cli": "^2.4.1",
8981
"@chromatic-com/storybook": "4.0.1",
9082
"@next/bundle-analyzer": "15.3.5",
9183
"@next/eslint-plugin-next": "15.3.5",
@@ -127,17 +119,15 @@
127119
"dev": "next dev --turbopack",
128120
"fix": "biome check ./src --fix && eslint ./src --fix",
129121
"format": "biome format ./src --write",
130-
"gen:theme-typings": "chakra-cli tokens src/chakra/theme/index.ts",
131122
"knip": "knip",
132123
"lint": "biome check ./src && knip && eslint ./src",
133124
"playwright": "playwright test",
134125
"postbuild": "next-sitemap",
135-
"postinstall": "pnpm run gen:theme-typings",
136126
"preinstall": "npx only-allow pnpm",
137127
"start": "next start",
138128
"storybook": "storybook dev -p 6006",
139129
"typecheck": "tsc --noEmit",
140130
"update-checkly": "npx checkly deploy"
141131
},
142132
"version": "3.0.0"
143-
}
133+
}

apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/contract-page-layout.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { DeprecatedAlert } from "@app/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/DeprecatedAlert";
2-
import { ChakraProviderSetup } from "chakra/ChakraProviderSetup";
32
import type { ThirdwebContract } from "thirdweb";
43
import type { ChainMetadata } from "thirdweb/chains";
54
import type { SidebarLink } from "@/components/blocks/Sidebar";
@@ -36,7 +35,7 @@ export function ContractPageLayout(props: {
3635
} = props;
3736

3837
return (
39-
<ChakraProviderSetup>
38+
<div>
4039
<div className="border-border border-b py-8">
4140
<div className="container flex flex-col gap-4">
4241
<div className="flex flex-col justify-between gap-4 md:flex-row">
@@ -67,6 +66,6 @@ export function ContractPageLayout(props: {
6766
{props.children}
6867
<div className="h-20" />
6968
</SidebarLayout>
70-
</ChakraProviderSetup>
69+
</div>
7170
);
7271
}

0 commit comments

Comments
 (0)