Closed matthijs166 closed 2 years ago
Hi @matthijs166 I'm digging into this one. The question really comes down to whether you should import Payload from your callback, or the the React component imports it and sends it through to you.
Thanks! I see that I can use fetch directly without the need of authentication because the auth is set inside a cookie.
Would be cleaner to get the values without an extra fetch but dont think its easy to implement. Or it need to be build in a way like yoast SEO with the use of snippets variabels: https://yoast.com/help/list-available-snippet-variables-yoast-seo/
@matthijs166 YES! That is exactly what we've got in store for the future of this plugin. This same pattern will apply across a few other plugins as well, like the form builder.
For a generate function I want to get data from the settings page like this.
Thing is that its running client side so is there a way to access the payload api easy in the generate function?
Normaly it would be accesable via the req.payload object.