mirror of
https://github.com/theoludwig/theoludwig.git
synced 2025-10-11 17:06:21 +02:00
build(deps): update latest
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import typescriptESLint from "typescript-eslint"
|
||||
import { defineConfig } from "eslint/config"
|
||||
import config from "@repo/config-eslint"
|
||||
|
||||
export default typescriptESLint.config(...config, {
|
||||
export default defineConfig(...config, {
|
||||
files: ["**/*.ts", "**/*.tsx"],
|
||||
languageOptions: {
|
||||
parser: typescriptESLint.parser,
|
||||
|
@@ -17,7 +17,6 @@
|
||||
"@repo/utils": "workspace:*",
|
||||
"@repo/i18n": "workspace:*",
|
||||
"@repo/ui": "workspace:*",
|
||||
"@repo/react-hooks": "workspace:*",
|
||||
"@giscus/react": "catalog:",
|
||||
"@shikijs/rehype": "catalog:",
|
||||
"@mdx-js/mdx": "catalog:",
|
||||
|
@@ -1,7 +1,8 @@
|
||||
import typescriptESLint from "typescript-eslint"
|
||||
import { defineConfig } from "eslint/config"
|
||||
import config from "@repo/config-eslint"
|
||||
|
||||
export default typescriptESLint.config(...config, {
|
||||
export default defineConfig(...config, {
|
||||
files: ["**/*.ts", "**/*.tsx"],
|
||||
languageOptions: {
|
||||
parser: typescriptESLint.parser,
|
||||
|
@@ -1,13 +0,0 @@
|
||||
import typescriptESLint from "typescript-eslint"
|
||||
import config from "@repo/config-eslint"
|
||||
|
||||
export default typescriptESLint.config(...config, {
|
||||
files: ["**/*.ts", "**/*.tsx"],
|
||||
languageOptions: {
|
||||
parser: typescriptESLint.parser,
|
||||
parserOptions: {
|
||||
projectService: true,
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
},
|
||||
})
|
@@ -1,29 +0,0 @@
|
||||
{
|
||||
"name": "@repo/react-hooks",
|
||||
"version": "0.0.0-develop",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"exports": {
|
||||
"./useBoolean": "./src/useBoolean.ts",
|
||||
"./useIsMounted": "./src/useIsMounted.ts"
|
||||
},
|
||||
"scripts": {
|
||||
"lint:eslint": "eslint src --max-warnings 0",
|
||||
"lint:typescript": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "catalog:",
|
||||
"react-dom": "catalog:"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@repo/config-eslint": "workspace:*",
|
||||
"@repo/config-typescript": "workspace:*",
|
||||
"@types/react": "catalog:",
|
||||
"@types/react-dom": "catalog:",
|
||||
"@total-typescript/ts-reset": "catalog:",
|
||||
"eslint": "catalog:",
|
||||
"playwright": "catalog:",
|
||||
"typescript": "catalog:",
|
||||
"typescript-eslint": "catalog:"
|
||||
}
|
||||
}
|
@@ -1,15 +0,0 @@
|
||||
import { useEffect, useState } from "react"
|
||||
|
||||
export interface UseIsMountedOutput {
|
||||
isMounted: boolean
|
||||
}
|
||||
|
||||
export const useIsMounted = (): UseIsMountedOutput => {
|
||||
const [isMounted, setIsMounted] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
setIsMounted(true)
|
||||
}, [])
|
||||
|
||||
return { isMounted }
|
||||
}
|
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"extends": "@repo/config-typescript/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
||||
"types": ["@total-typescript/ts-reset"]
|
||||
}
|
||||
}
|
@@ -1,7 +1,8 @@
|
||||
import typescriptESLint from "typescript-eslint"
|
||||
import { defineConfig } from "eslint/config"
|
||||
import config from "@repo/config-eslint"
|
||||
|
||||
export default typescriptESLint.config(...config, {
|
||||
export default defineConfig(...config, {
|
||||
files: ["**/*.ts", "**/*.tsx"],
|
||||
languageOptions: {
|
||||
parser: typescriptESLint.parser,
|
||||
|
@@ -30,7 +30,6 @@
|
||||
"@repo/config-tailwind": "workspace:*",
|
||||
"@repo/utils": "workspace:*",
|
||||
"@repo/i18n": "workspace:*",
|
||||
"@repo/react-hooks": "workspace:*",
|
||||
"cva": "catalog:",
|
||||
"next": "catalog:",
|
||||
"next-intl": "catalog:",
|
||||
|
@@ -6,9 +6,9 @@ import { LOCALES } from "@repo/utils/constants"
|
||||
import { useLocale } from "next-intl"
|
||||
import { useEffect, useRef } from "react"
|
||||
|
||||
import { useBoolean } from "@repo/react-hooks/useBoolean"
|
||||
import { Arrow } from "./Arrow.tsx"
|
||||
import { LocaleFlag } from "./LocaleFlag.tsx"
|
||||
import { useBoolean } from "../../../hooks/useBoolean.ts"
|
||||
|
||||
export interface LocalesProps {}
|
||||
|
||||
|
@@ -1,13 +1,13 @@
|
||||
"use client"
|
||||
|
||||
import { classNames } from "@repo/config-tailwind/classNames"
|
||||
import { useIsMounted } from "@repo/react-hooks/useIsMounted"
|
||||
import type { Theme } from "@repo/utils/constants"
|
||||
import { THEME_DEFAULT } from "@repo/utils/constants"
|
||||
import {
|
||||
ThemeProvider as NextThemeProvider,
|
||||
useTheme as useNextTheme,
|
||||
} from "next-themes"
|
||||
import { useEffect, useState } from "react"
|
||||
|
||||
export interface ThemeProviderProps extends React.PropsWithChildren {
|
||||
forcedTheme?: Theme
|
||||
@@ -35,7 +35,12 @@ export interface UseThemeOutput {
|
||||
|
||||
export const useTheme = (): UseThemeOutput => {
|
||||
const { setTheme, theme: themeData } = useNextTheme()
|
||||
const { isMounted } = useIsMounted()
|
||||
const [isMounted, setIsMounted] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
setIsMounted(true)
|
||||
}, [])
|
||||
|
||||
const theme = isMounted ? (themeData as Theme) : THEME_DEFAULT
|
||||
|
||||
|
@@ -1,7 +1,8 @@
|
||||
import typescriptESLint from "typescript-eslint"
|
||||
import { defineConfig } from "eslint/config"
|
||||
import config from "@repo/config-eslint"
|
||||
|
||||
export default typescriptESLint.config(...config, {
|
||||
export default defineConfig(...config, {
|
||||
files: ["**/*.ts", "**/*.tsx"],
|
||||
languageOptions: {
|
||||
parser: typescriptESLint.parser,
|
||||
|
Reference in New Issue
Block a user