-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Ej/ useMapStylesQuery hook #741
Conversation
Im not really sure whats going on, but it added a bunch of unneccessary files. Also, the hook is still not returning the correct data here. |
Ok I've tried another way to approach this, instead of modifying the data once we've made the query I'm modifying the query itself. I can't see anywhere else we use is query so it should be ok, but if we foresee needing the full data package in the future we could pass it a edit: Ok so it looks like we need the rest of the data, not just the URL, makes more sense to update |
offlineBackgroundMapName: 'Offline Map' | ||
}) | ||
|
||
export const useMapStylesQuery = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you enforce the typing to `UseQueryResult<MapServerStyleInfo[]>. Both functions are returning that, but since one is not ecplicitly that, 2 different types are coming up in the ts definitions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you rebase/merge. there should only be the one file that is being checked
Description
Adds two new hooks to fetch map styles using new react-query when backgroundmaps enabled, otherwise reverts to legacy api.
closes #734