mirror of
https://github.com/docmost/docmost.git
synced 2026-09-12 08:21:32 +08:00
feat(beta): public spaces (#2473)
This commit is contained in:
@@ -2,6 +2,7 @@ import { keepPreviousData, useQuery, UseQueryResult } from "@tanstack/react-quer
|
||||
import {
|
||||
searchAttachments,
|
||||
searchPage,
|
||||
searchPublicSpace,
|
||||
searchShare,
|
||||
searchSuggestions,
|
||||
} from '@/features/search/services/search-service';
|
||||
@@ -55,3 +56,13 @@ export function useAttachmentSearchQuery(
|
||||
enabled: !!params.query,
|
||||
});
|
||||
}
|
||||
|
||||
export function usePublicSpaceSearchQuery(
|
||||
params: IPageSearchParams & { spaceSlug: string },
|
||||
): UseQueryResult<IPageSearch[], Error> {
|
||||
return useQuery({
|
||||
queryKey: ["public-space-search", params],
|
||||
queryFn: () => searchPublicSpace(params),
|
||||
enabled: !!params.query && !!params.spaceSlug,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user