Inject secret into my livePreview button function

default discord avatar
last month

Hi, I've done the function that returns the string expected by livePreview, except that since it's run client-side I can't access the environment variables and the secret returns undefined. Any idea how to do this?

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!


Connect with the Payload Community on Discord



Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.