resolve icon indicating copy to clipboard operation
resolve copied to clipboard

Please add useCDNUrl react hook

Open alexslavr opened this issue 2 years ago • 0 comments

In the "personal-data" example, the custom UploaderContext is used to get the upload CDN URL. https://github.com/reimagined/resolve/blob/dev/examples/ts/personal-data/client/components/ImageUpload.tsx#L55

But I figured out that the CDN URL is also available in ResolveContext:

import { ResolveContext } from '@resolve-js/react-hooks'
const { cdnUrl: CDNUrl } = useContext(ResolveContext)

Please, add the useCDNUrl hook to get cdnUrl directly from the ResolveContext.

alexslavr avatar Nov 25 '21 09:11 alexslavr