import config from '@automattic/calypso-config'; import { createRoot } from 'react-dom/client'; import './style.scss'; function AuthHelper() { const isOAuth = config.isEnabled( 'oauth' ); function setAuth( event ) { const value = event.currentTarget.value; window.location.href = '?' + new URLSearchParams( { flags: value } ).toString(); } return ( <>
Auth: { isOAuth ? 'OAuth' : 'Cookies' }
); } export default ( element ) => createRoot( element ).render( );