How to check membership status with Admin API JS Client

I’m building a site with membership feature with Next.js but I can’t find any information about checking viewer membership status with Admin API like if @member helper block in Handlebars .

{{#if @member}}
  <a href="javascript:" data-members-signout>Sign out</a>
  <form data-members-form="signin">
    <input data-members-email type="email" required="true"/>
    <button type="submit">Sign in</button>

So please give me some advices. Thanks.

The Ghost member’s API isn’t officially supported in a headless context :slightly_smiling_face: