Inject secret into my livePreview button function

default discord avatar
<Clement/>
last month
1

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!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

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