mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-05-19 12:27:29 +08:00
feat: refactor code
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
clearSearchHistory,
|
||||
getSearchHistory,
|
||||
} from '@/lib/db.client';
|
||||
import { SearchResult } from '@/lib/types';
|
||||
|
||||
import AggregateCard from '@/components/AggregateCard';
|
||||
import PageLayout from '@/components/PageLayout';
|
||||
@@ -19,20 +20,6 @@ function SearchPageClient() {
|
||||
// 搜索历史
|
||||
const [searchHistory, setSearchHistory] = useState<string[]>([]);
|
||||
|
||||
// 定义搜索结果类型
|
||||
type SearchResult = {
|
||||
id: string;
|
||||
title: string;
|
||||
poster: string;
|
||||
source: string;
|
||||
source_name: string;
|
||||
episodes: string[];
|
||||
year: string;
|
||||
class?: string;
|
||||
type_name?: string;
|
||||
desc?: string;
|
||||
};
|
||||
|
||||
const router = useRouter();
|
||||
const searchParams = useSearchParams();
|
||||
const [searchQuery, setSearchQuery] = useState('');
|
||||
|
||||
Reference in New Issue
Block a user