What is the JS equivalent of get_option(‘wp_page_for_privacy_policy’); when building a block?

[ad_1]

I'm currently building a new custom block and trying to find out what the equivalent of the following is in JavaScript.

get_option('wp_page_for_privacy_policy');

I have tried a number of options and been scouring the docs.

Most recent attempt is:

 const privacyPolicy = useSelect(
        useSelect((select) => select('core').getOption('wp_page_for_privacy_policy'), [])
    );

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer