import { auth } from "@/auth"; import { DictionaryEntry } from "./DictionaryEntry"; import { TSharedItem } from "@/shared/dictionary-type"; import { SaveButtonClient, ReLookupButtonClient } from "./SearchResult.client"; import { headers } from "next/headers"; import { actionGetFoldersByUserId } from "@/modules/folder/folder-aciton"; import { TSharedFolder } from "@/shared/folder-type"; interface SearchResultProps { searchResult: TSharedItem | null; searchQuery: string; queryLang: string; definitionLang: string; } export async function SearchResult({ searchResult, searchQuery, queryLang, definitionLang }: SearchResultProps) { // 获取用户会话和文件夹 const session = await auth.api.getSession({ headers: await headers() }); let folders: TSharedFolder[] = []; if (session?.user?.id) { const result = await actionGetFoldersByUserId(session.user.id as string); if (result.success && result.data) { folders = result.data; } } return (
No results found
Try other words