Function useOpenDocument

A hook which allows displaying and interacting with a document preview.

  • Parameters

    • options: IParams = {}

      An optional object containing the following parameters:

    Returns {
        pickData: ((request: IRequest) => void);
        render: (() => Element);
    }

    • An object containing the following properties:
    • pickData: ((request: IRequest) => void)
        • (request): void
        • Sets the parameters of the given request and redirects to the home page. Then picks the data from the given request URL.

          Parameters

          • request: IRequest

            The request object.

          Returns void

    • render: (() => Element)
        • (): Element
        • Returns Element