reimagined / resolve

Full stack CQRS, DDD, Event Sourcing framework for Node.js

Home Page:https://reimagined.github.io/resolve/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Please add useCDNUrl react hook

alexslavr opened this issue · 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.