mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
perf: remove unused imports
This commit is contained in:
parent
b4c3bccace
commit
a8f4c8564f
@ -8,7 +8,7 @@ import getEnv from "@/lib/env-entry"
|
|||||||
import { DateTime } from "luxon"
|
import { DateTime } from "luxon"
|
||||||
import { useTranslations } from "next-intl"
|
import { useTranslations } from "next-intl"
|
||||||
import { useRouter } from "next/navigation"
|
import { useRouter } from "next/navigation"
|
||||||
import React, { useEffect, useRef, useState } from "react"
|
import { useEffect, useState } from "react"
|
||||||
|
|
||||||
function Header() {
|
function Header() {
|
||||||
const t = useTranslations("Header")
|
const t = useTranslations("Header")
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
import React, { ReactNode, createContext, useContext, useState } from "react"
|
import { ReactNode, createContext, useContext, useState } from "react"
|
||||||
|
|
||||||
interface FilterContextType {
|
interface FilterContextType {
|
||||||
filter: boolean
|
filter: boolean
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
import React, { ReactNode, createContext, useContext, useState } from "react"
|
import { ReactNode, createContext, useContext, useState } from "react"
|
||||||
|
|
||||||
type Status = "all" | "online" | "offline"
|
type Status = "all" | "online" | "offline"
|
||||||
|
|
||||||
|
@ -52,6 +52,7 @@
|
|||||||
"linter": {
|
"linter": {
|
||||||
"rules": {
|
"rules": {
|
||||||
"correctness": {
|
"correctness": {
|
||||||
|
"noUnusedImports": "error",
|
||||||
"noConstAssign": "off",
|
"noConstAssign": "off",
|
||||||
"noGlobalObjectCalls": "off",
|
"noGlobalObjectCalls": "off",
|
||||||
"noInvalidBuiltinInstantiation": "off",
|
"noInvalidBuiltinInstantiation": "off",
|
||||||
@ -73,7 +74,6 @@
|
|||||||
"noDuplicateObjectKeys": "off",
|
"noDuplicateObjectKeys": "off",
|
||||||
"noDuplicateParameters": "off",
|
"noDuplicateParameters": "off",
|
||||||
"noFunctionAssign": "off",
|
"noFunctionAssign": "off",
|
||||||
"noImportAssign": "off",
|
|
||||||
"noRedeclare": "off",
|
"noRedeclare": "off",
|
||||||
"noUnsafeNegation": "off",
|
"noUnsafeNegation": "off",
|
||||||
"useGetterReturn": "off"
|
"useGetterReturn": "off"
|
||||||
|
@ -12,7 +12,6 @@ import { setUserLocale } from "@/i18n/locale"
|
|||||||
import { cn } from "@/lib/utils"
|
import { cn } from "@/lib/utils"
|
||||||
import { CheckCircleIcon } from "@heroicons/react/20/solid"
|
import { CheckCircleIcon } from "@heroicons/react/20/solid"
|
||||||
import { useLocale } from "next-intl"
|
import { useLocale } from "next-intl"
|
||||||
import * as React from "react"
|
|
||||||
|
|
||||||
export function LanguageSwitcher() {
|
export function LanguageSwitcher() {
|
||||||
const locale = useLocale()
|
const locale = useLocale()
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { Progress } from "@/components/ui/progress"
|
import { Progress } from "@/components/ui/progress"
|
||||||
import React from "react"
|
|
||||||
|
|
||||||
type ServerUsageBarProps = {
|
type ServerUsageBarProps = {
|
||||||
value: number
|
value: number
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
import getEnv from "@/lib/env-entry"
|
import getEnv from "@/lib/env-entry"
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from "@/lib/utils"
|
||||||
import { useTranslations } from "next-intl"
|
import { useTranslations } from "next-intl"
|
||||||
import React, { createRef, useEffect, useRef, useState } from "react"
|
import { createRef, useEffect, useRef, useState } from "react"
|
||||||
|
|
||||||
export default function Switch({
|
export default function Switch({
|
||||||
allTag,
|
allTag,
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from "@/lib/utils"
|
||||||
import { useTranslations } from "next-intl"
|
import { useTranslations } from "next-intl"
|
||||||
import React, { useEffect, useRef, useState } from "react"
|
import { useEffect, useRef, useState } from "react"
|
||||||
|
|
||||||
export default function TabSwitch({
|
export default function TabSwitch({
|
||||||
tabs,
|
tabs,
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import Image from "next/image"
|
import Image from "next/image"
|
||||||
import Link from "next/link"
|
import Link from "next/link"
|
||||||
import React from "react"
|
|
||||||
|
|
||||||
export const AnimatedTooltip = ({
|
export const AnimatedTooltip = ({
|
||||||
items,
|
items,
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import React from "react"
|
|
||||||
import type { SVGProps } from "react"
|
import type { SVGProps } from "react"
|
||||||
|
|
||||||
export function GetFontLogoClass(platform: string): string {
|
export function GetFontLogoClass(platform: string): string {
|
||||||
|
Loading…
Reference in New Issue
Block a user