1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2025-05-29 22:37:44 +02:00

chore: simplify TypeScript config

This commit is contained in:
2024-09-11 23:53:26 +02:00
parent 6853ac6884
commit 386f407f21
98 changed files with 2355 additions and 2682 deletions

View File

@ -1,6 +1,6 @@
import type { Meta, StoryObj } from "@storybook/react"
import { Footer as FooterComponent } from "./Footer"
import { Footer as FooterComponent } from "./Footer.tsx"
const meta = {
title: "Layout/Footer",

View File

@ -1,7 +1,7 @@
import { useTranslations } from "next-intl"
import { GIT_REPO_LINK } from "@repo/utils/constants"
import { Link } from "../../Design/Link/Link"
import { Link } from "../../Design/Link/Link.tsx"
export interface FooterProps {
version: string

View File

@ -1,6 +1,6 @@
import type { Meta, StoryObj } from "@storybook/react"
import { Header as HeaderComponent } from "./Header"
import { Header as HeaderComponent } from "./Header.tsx"
const meta = {
title: "Layout/Header",

View File

@ -1,8 +1,8 @@
import { useTranslations } from "next-intl"
import Image from "next/image"
import { Link } from "../../Design/Link/Link"
import { Locales } from "./Locales/Locales"
import { SwitchTheme } from "./SwitchTheme"
import { Link } from "../../Design/Link/Link.tsx"
import { Locales } from "./Locales/Locales.tsx"
import { SwitchTheme } from "./SwitchTheme.tsx"
export interface HeaderProps {}

View File

@ -1,4 +1,4 @@
import type { Locale } from "@repo/i18n/config"
import type { Locale } from "@repo/utils/constants"
import { useTranslations } from "next-intl"
import Image from "next/image"

View File

@ -1,15 +1,15 @@
"use client"
import { classNames } from "@repo/config-tailwind/classNames"
import type { Locale } from "@repo/i18n/config"
import { LOCALES } from "@repo/i18n/config"
import { usePathname, useRouter } from "@repo/i18n/navigation"
import type { Locale } from "@repo/utils/constants"
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"
import { LocaleFlag } from "./LocaleFlag"
import { Arrow } from "./Arrow.tsx"
import { LocaleFlag } from "./LocaleFlag.tsx"
export interface LocalesProps {}

View File

@ -2,15 +2,13 @@
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"
export const THEMES = ["light", "dark"] as const
export type Theme = (typeof THEMES)[number]
export const THEME_DEFAULT = "dark" as Theme
export interface ThemeProviderProps extends React.PropsWithChildren {
forcedTheme?: Theme
}

View File

@ -1,8 +1,8 @@
import { classNames } from "@repo/config-tailwind/classNames"
import type { TypographyProps } from "../../Design/Typography/Typography"
import { Typography } from "../../Design/Typography/Typography"
import type { TypographyProps } from "../../Design/Typography/Typography.tsx"
import { Typography } from "../../Design/Typography/Typography.tsx"
export * from "./RevealFade"
export * from "./RevealFade.tsx"
export interface SectionProps
extends React.ComponentPropsWithoutRef<"section"> {