File tree Expand file tree Collapse file tree 3 files changed +17
-16
lines changed Expand file tree Collapse file tree 3 files changed +17
-16
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import type { AppProps } from "next/app"
4
4
import type { StaticImageData } from "next/image"
5
5
import type { SSRConfig } from "next-i18next"
6
6
import type { ReactElement , ReactNode } from "react"
7
- import resolveConfig from "tailwindcss/resolveConfig"
8
7
import type { Icon } from "@chakra-ui/react"
9
8
10
9
import type {
@@ -26,8 +25,8 @@ import allQuestionData from "@/data/quizzes/questionBank"
26
25
27
26
import { WALLETS_FILTERS_DEFAULT } from "./constants"
28
27
29
- import tailwindConfig from "@/../tailwind.config"
30
28
import { layoutMapping } from "@/pages/[...slug]"
29
+ import twConfig from "@/styles/config"
31
30
32
31
// Credit: https://stackoverflow.com/a/52331580
33
32
export type Unpacked < T > = T extends ( infer U ) [ ] ? U : T
@@ -829,6 +828,4 @@ export type EventCardProps = {
829
828
imageUrl ?: string
830
829
}
831
830
832
- const twConfig = resolveConfig ( tailwindConfig )
833
-
834
831
export type BreakpointKey = keyof typeof twConfig . theme . screens
Original file line number Diff line number Diff line change 1
- import resolveConfig from "tailwindcss/resolveConfig"
2
-
3
1
import type { BreakpointKey } from "../types"
4
2
5
- import tailwindConfig from "@/../tailwind.config"
6
-
7
- const fullConfig = resolveConfig ( tailwindConfig )
3
+ import twConfig from "@/styles/config"
8
4
9
- export const breakpointAsNumber = Object . entries (
10
- fullConfig . theme . screens
11
- ) . reduce ( ( acc , curr ) => {
12
- const [ breakpoint , value ] = curr
13
- acc [ breakpoint ] = + value . split ( "px" ) [ 0 ]
14
- return acc
15
- } , { } ) as Record < BreakpointKey , number >
5
+ export const breakpointAsNumber = Object . entries ( twConfig . theme . screens ) . reduce (
6
+ ( acc , curr ) => {
7
+ const [ breakpoint , value ] = curr
8
+ acc [ breakpoint ] = + value . split ( "px" ) [ 0 ]
9
+ return acc
10
+ } ,
11
+ { }
12
+ ) as Record < BreakpointKey , number >
Original file line number Diff line number Diff line change
1
+ import resolveConfig from "tailwindcss/resolveConfig"
2
+
3
+ import tailwindConfig from "../../tailwind.config"
4
+
5
+ const config = resolveConfig ( tailwindConfig )
6
+
7
+ export default config
You can’t perform that action at this time.
0 commit comments