ultisuite-client/lib/drive/drive-route-context.tsx
R3D347HR4Y ad1370ea7e
Some checks are pending
E2E / Playwright e2e (push) Waiting to run
feat: enhance configuration and add new demo layouts
- Introduced turbopack alias for canvas in next.config.mjs.
- Updated package.json scripts for development and branding tasks.
- Added new dependencies for Tiptap extensions.
- Implemented new demo layouts for agenda, contacts, drive, and mail applications.
- Enhanced globals.css for improved theming and splash screen animations.
- Added OAuth callback handling for drive mounts.
- Updated layout components to integrate new demo shells and improve structure.
2026-06-12 19:10:24 +02:00

31 lines
716 B
TypeScript

"use client"
import { createContext, useContext, type ReactNode } from "react"
export const DEFAULT_DRIVE_ROUTE_ROOT = "drive"
const DriveRouteRootContext = createContext(DEFAULT_DRIVE_ROUTE_ROOT)
export function DriveRouteRootProvider({
routeRoot = DEFAULT_DRIVE_ROUTE_ROOT,
children,
}: {
routeRoot?: string
children: ReactNode
}) {
return (
<DriveRouteRootContext.Provider value={routeRoot}>
{children}
</DriveRouteRootContext.Provider>
)
}
export function useDriveRouteRoot(): string {
return useContext(DriveRouteRootContext)
}
/** Demo shell may override route root via context provider. */
export function useDriveRouteRootFromDemo(): string {
return useDriveRouteRoot()
}