- Updated .env.example to include configuration for OnlyOffice Document Server. - Modified the workspace configuration to remove the drive-suite path. - Adjusted TypeScript environment imports for consistency. - Enhanced Next.js configuration to disable canvas in Webpack. - Updated package.json to include new dependencies for OnlyOffice and PDF.js. - Added global styles for OnlyOffice theme integration in the CSS. - Created new layout and page components for the Drive feature, including public sharing and editing functionalities. - Updated metadata handling across various layouts to reflect the new app structure.
14 lines
398 B
TypeScript
14 lines
398 B
TypeScript
"use client"
|
|
|
|
import { useQuery } from "@tanstack/react-query"
|
|
import { fetchPublicShare } from "@/lib/api/public-share"
|
|
|
|
export function usePublicShare(token: string, path: string, password?: string) {
|
|
return useQuery({
|
|
queryKey: ["public-share", token, path, password ?? ""],
|
|
queryFn: () => fetchPublicShare(token, path, password),
|
|
enabled: Boolean(token),
|
|
retry: false,
|
|
})
|
|
}
|