fix: lint type import
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
import { useState } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { authService } from "@/lib/services/auth.service";
|
||||
import { AppErrorType } from "@/types/global";
|
||||
import type { AppErrorType } from "@/types/global";
|
||||
import { ErrorMessage } from "@/components/ui/ErrorMessage";
|
||||
import { useTranslate } from "@/hooks/useTranslate";
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { useState } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { authService } from "@/lib/services/auth.service";
|
||||
import { AppErrorType } from "@/types/global";
|
||||
import type { AppErrorType } from "@/types/global";
|
||||
import { ERROR_CODES } from "@/constants/errorCodes";
|
||||
import { ErrorMessage } from "@/components/ui/ErrorMessage";
|
||||
import { useTranslate } from "@/hooks/useTranslate";
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
RefreshCw,
|
||||
Globe,
|
||||
} from "lucide-react";
|
||||
import { CacheType } from "@/lib/services/base-api.service";
|
||||
import type { CacheType } from "@/lib/services/base-api.service";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
interface RequestTiming {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect, useState, useCallback } from "react";
|
||||
import { KomgaBook } from "@/types/komga";
|
||||
import type { KomgaBook } from "@/types/komga";
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
||||
import { Card } from "@/components/ui/card";
|
||||
import { Button } from "@/components/ui/button";
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { SeriesCover } from "@/components/ui/series-cover";
|
||||
import { useTranslate } from "@/hooks/useTranslate";
|
||||
import { KomgaSeries } from "@/types/komga";
|
||||
import type { KomgaSeries } from "@/types/komga";
|
||||
|
||||
interface OptimizedHeroSeries {
|
||||
id: string;
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
import { HeroSection } from "./HeroSection";
|
||||
import { MediaRow } from "./MediaRow";
|
||||
import { KomgaBook, KomgaSeries } from "@/types/komga";
|
||||
import type { KomgaBook, KomgaSeries } from "@/types/komga";
|
||||
import { RefreshButton } from "@/components/library/RefreshButton";
|
||||
import { History, Sparkles, Clock, LibraryBig, BookOpen } from "lucide-react";
|
||||
import { HomeData } from "@/lib/services/home.service";
|
||||
import type { HomeData } from "@/lib/services/home.service";
|
||||
import { useTranslate } from "@/hooks/useTranslate";
|
||||
|
||||
interface HomeContentProps {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { ChevronLeft, ChevronRight } from "lucide-react";
|
||||
import { useRef, useState } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { KomgaBook, KomgaSeries } from "@/types/komga";
|
||||
import type { KomgaBook, KomgaSeries } from "@/types/komga";
|
||||
import { BookCover } from "../ui/book-cover";
|
||||
import { SeriesCover } from "../ui/series-cover";
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import { usePathname, useRouter } from "next/navigation";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { authService } from "@/lib/services/auth.service";
|
||||
import { useEffect, useState, useCallback } from "react";
|
||||
import { KomgaLibrary, KomgaSeries } from "@/types/komga";
|
||||
import type { KomgaLibrary, KomgaSeries } from "@/types/komga";
|
||||
import { usePreferences } from "@/contexts/PreferencesContext";
|
||||
import { AppError } from "@/utils/errors";
|
||||
import { ERROR_CODES } from "@/constants/errorCodes";
|
||||
|
||||
@@ -6,7 +6,7 @@ import { useRouter, usePathname, useSearchParams } from "next/navigation";
|
||||
import { useState, useEffect } from "react";
|
||||
import { Loader2, Filter } from "lucide-react";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { KomgaSeries } from "@/types/komga";
|
||||
import type { KomgaSeries } from "@/types/komga";
|
||||
import { SearchInput } from "./SearchInput";
|
||||
import { useTranslate } from "@/hooks/useTranslate";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { KomgaSeries } from "@/types/komga";
|
||||
import type { KomgaSeries } from "@/types/komga";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { SeriesCover } from "@/components/ui/series-cover";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { PropsWithChildren } from "react";
|
||||
import type { PropsWithChildren } from "react";
|
||||
import { useTranslate } from "@/hooks/useTranslate";
|
||||
import "@/i18n/i18n";
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* eslint-disable @next/next/no-img-element */
|
||||
"use client";
|
||||
|
||||
import { BookReaderProps } from "./types";
|
||||
import type { BookReaderProps } from "./types";
|
||||
import { useOrientation } from "./hooks/useOrientation";
|
||||
import { usePageNavigation } from "./hooks/usePageNavigation";
|
||||
import { usePageCache } from "./hooks/usePageCache";
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useState } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { KomgaBook } from "@/types/komga";
|
||||
import type { KomgaBook } from "@/types/komga";
|
||||
import { BookReader } from "./BookReader";
|
||||
import { Button } from "@/components/ui/button";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { KomgaBook } from "@/types/komga";
|
||||
import type { KomgaBook } from "@/types/komga";
|
||||
import { BookReader } from "./BookReader";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { ClientOfflineBookService } from "@/lib/services/client-offlinebook.service";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ControlButtonsProps } from "../types";
|
||||
import type { ControlButtonsProps } from "../types";
|
||||
import {
|
||||
ChevronLeft,
|
||||
ChevronRight,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { NavigationBarProps } from "../types";
|
||||
import type { NavigationBarProps } from "../types";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { Thumbnail } from "./Thumbnail";
|
||||
import { useThumbnails } from "../hooks/useThumbnails";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ThumbnailProps } from "../types";
|
||||
import type { ThumbnailProps } from "../types";
|
||||
import { ImageLoader } from "@/components/ui/image-loader";
|
||||
import { cn } from "@/lib/utils";
|
||||
import Image from "next/image";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useCallback, useRef } from "react";
|
||||
import { PageCache } from "../types";
|
||||
import { KomgaBook } from "@/types/komga";
|
||||
import type { PageCache } from "../types";
|
||||
import type { KomgaBook } from "@/types/komga";
|
||||
|
||||
interface UsePageCacheProps {
|
||||
book: KomgaBook;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useState, useCallback, useEffect, useRef } from "react";
|
||||
import { KomgaBook } from "@/types/komga";
|
||||
import type { KomgaBook } from "@/types/komga";
|
||||
import { ClientOfflineBookService } from "@/lib/services/client-offlinebook.service";
|
||||
|
||||
interface UsePageNavigationProps {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useState, useCallback, useEffect } from "react";
|
||||
import { KomgaBook } from "@/types/komga";
|
||||
import type { KomgaBook } from "@/types/komga";
|
||||
|
||||
interface UseThumbnailsProps {
|
||||
book: KomgaBook;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { KomgaBook } from "@/types/komga";
|
||||
import type { KomgaBook } from "@/types/komga";
|
||||
|
||||
export interface PageCache {
|
||||
[pageNumber: number]: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { KomgaBook } from "@/types/komga";
|
||||
import type { KomgaBook } from "@/types/komga";
|
||||
import { BookCover } from "@/components/ui/book-cover";
|
||||
import { useState, useEffect } from "react";
|
||||
import { useTranslate } from "@/hooks/useTranslate";
|
||||
|
||||
@@ -6,7 +6,7 @@ import { useRouter, usePathname, useSearchParams } from "next/navigation";
|
||||
import { useState, useEffect } from "react";
|
||||
import { Loader2, Filter } from "lucide-react";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { KomgaBook } from "@/types/komga";
|
||||
import type { KomgaBook } from "@/types/komga";
|
||||
import { useTranslate } from "@/hooks/useTranslate";
|
||||
|
||||
interface PaginatedBookGridProps {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { Book, BookOpen, BookMarked, Star, StarOff } from "lucide-react";
|
||||
import { KomgaSeries } from "@/types/komga";
|
||||
import type { KomgaSeries } from "@/types/komga";
|
||||
import { useState, useEffect } from "react";
|
||||
import { Button } from "../ui/button";
|
||||
import { useToast } from "@/components/ui/use-toast";
|
||||
|
||||
@@ -6,7 +6,7 @@ import { useToast } from "@/components/ui/use-toast";
|
||||
import { Trash2, Loader2 } from "lucide-react";
|
||||
import { CacheModeSwitch } from "@/components/settings/CacheModeSwitch";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { TTLConfigData } from "@/types/komga";
|
||||
import type { TTLConfigData } from "@/types/komga";
|
||||
|
||||
interface CacheSettingsProps {
|
||||
initialTTLConfig: TTLConfigData | null;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { KomgaConfig, TTLConfigData } from "@/types/komga";
|
||||
import type { KomgaConfig, TTLConfigData } from "@/types/komga";
|
||||
import { useTranslate } from "@/hooks/useTranslate";
|
||||
import { DisplaySettings } from "./DisplaySettings";
|
||||
import { KomgaSettings } from "./KomgaSettings";
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useState } from "react";
|
||||
import { useTranslate } from "@/hooks/useTranslate";
|
||||
import { useToast } from "@/components/ui/use-toast";
|
||||
import { Network, Loader2 } from "lucide-react";
|
||||
import { KomgaConfig } from "@/types/komga";
|
||||
import type { KomgaConfig } from "@/types/komga";
|
||||
|
||||
interface KomgaSettingsProps {
|
||||
initialConfig: KomgaConfig | null;
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
|
||||
import { CoverClient } from "./cover-client";
|
||||
import { ProgressBar } from "./progress-bar";
|
||||
import { BookCoverProps, getImageUrl } from "./cover-utils";
|
||||
import type { BookCoverProps} from "./cover-utils";
|
||||
import { getImageUrl } from "./cover-utils";
|
||||
import { ClientOfflineBookService } from "@/lib/services/client-offlinebook.service";
|
||||
import { MarkAsReadButton } from "./mark-as-read-button";
|
||||
import { MarkAsUnreadButton } from "./mark-as-unread-button";
|
||||
import { BookOfflineButton } from "./book-offline-button";
|
||||
import { useTranslate } from "@/hooks/useTranslate";
|
||||
import { KomgaBook } from "@/types/komga";
|
||||
import type { KomgaBook } from "@/types/komga";
|
||||
import { formatDate } from "@/lib/utils";
|
||||
|
||||
// Fonction utilitaire pour obtenir les informations de statut de lecture
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useState, useEffect, useCallback } from "react";
|
||||
import { Download, Check, Loader2 } from "lucide-react";
|
||||
import { Button } from "./button";
|
||||
import { useToast } from "./use-toast";
|
||||
import { KomgaBook } from "@/types/komga";
|
||||
import type { KomgaBook } from "@/types/komga";
|
||||
|
||||
interface BookOfflineButtonProps {
|
||||
book: KomgaBook;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { KomgaBook, KomgaSeries } from "@/types/komga";
|
||||
import type { KomgaBook, KomgaSeries } from "@/types/komga";
|
||||
|
||||
export interface BaseCoverProps {
|
||||
alt?: string;
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
import { CoverClient } from "./cover-client";
|
||||
import { ProgressBar } from "./progress-bar";
|
||||
import { SeriesCoverProps, getImageUrl } from "./cover-utils";
|
||||
import type { SeriesCoverProps} from "./cover-utils";
|
||||
import { getImageUrl } from "./cover-utils";
|
||||
|
||||
export function SeriesCover({
|
||||
series,
|
||||
|
||||
Reference in New Issue
Block a user