License validation in forge custom UI

Hi Everyone,

I’m new to Forge platform, I’m trying to validate the app license using below snippet but it always getting false value when try to access

import { view } from "@forge/bridge";

const context = await view.getContext();

function App(){
const [license, setLicense] = useState(true)
//inside useEffect function

 return (
        <div className='ttlbody'>
          <div className={license !== true ? 'license' : 'hide'}> 
            <p><FaExclamationTriangle className='alerticon'/> <License warning message></p>

Thanks in advance,

You need to publish it to the marketplace to have active license