remove preview for all file except images
This commit is contained in:
@@ -5,6 +5,7 @@ import { searchUserFiles, searchGlobalFiles } from '@/app/actions/searchActions'
|
||||
import { useQueryClient } from '@tanstack/react-query';
|
||||
import { Pagination } from '@/app/components/Pagination';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { AllowedExtensions } from '@/app/ui/search/section-search-file';
|
||||
|
||||
export interface SearchItem {
|
||||
url: string,
|
||||
@@ -15,7 +16,7 @@ export interface SearchItem {
|
||||
pageUrl: string
|
||||
}
|
||||
|
||||
export function FileSearchPanel({ fileId, ref }: { fileId: string | null, ref: any }) {
|
||||
export function FileSearchPanel({ fileId, ref, allowedExtensions }: { fileId: string | null, ref: any, allowedExtensions: AllowedExtensions }) {
|
||||
const [searchedUserFiles, setSearchedUserFiles] = useState<string[]>([]);
|
||||
const [searchedUserFilesShowNull, setSearchedUserFilesShowNull] = useState<boolean>(false);
|
||||
const [searchedGlobalFiles, setSearchedGlobalFiles] = useState<SearchItem[]>([]);
|
||||
@@ -117,7 +118,7 @@ export function FileSearchPanel({ fileId, ref }: { fileId: string | null, ref: a
|
||||
</div>
|
||||
|
||||
{(searchedUserFiles.length !== 0) && (
|
||||
<SearchedUserFilesList list={searchedUserFiles} />
|
||||
<SearchedUserFilesList list={searchedUserFiles} allowedExtensions={allowedExtensions} />
|
||||
)}
|
||||
|
||||
{searchedUserFilesShowNull && (
|
||||
|
||||
Reference in New Issue
Block a user