Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add useCDNUrl react hook #2150

Open
alexslavr opened this issue Nov 25, 2021 · 0 comments
Open

Please add useCDNUrl react hook #2150

alexslavr opened this issue Nov 25, 2021 · 0 comments
Labels
enhancement Issues related to potential improvements and new features

Comments

@alexslavr
Copy link

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.

@MrCheater MrCheater added the enhancement Issues related to potential improvements and new features label Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues related to potential improvements and new features
Projects
None yet
Development

No branches or pull requests

2 participants