title: How to redirect and send variables of the current logged in correctly?
body: <p>Hello how are you ? I'm new to javascript and I need help with a question. I'm trying to send data of the current logged in member and redirect a different domain via a button on the website creation <a href="http://www.wix.com" rel="nofollow noreferrer">www.wix.com</a>. The data are status, full name, email and id. The language used is javascript.
  I would like to know what I do to be able to send this data together in the url and what I'm doing wrong in the code.</p>
  <pre><code>import { currentMember } from 'wix-members';
  import wixLocation from 'wix-location';
  
  export function button2_click(event) {
    wixLocation.to(&quot;www.page.com&quot; + currentMember.getMember().then((member) =&gt; {
        const id = member._id;
        const status = member.status
        const fullName = `${member.contactDetails.firstName} ${member.contactDetails.lastName}`;
        return member;
      })
      .catch((error) =&gt; {
        console.error(error);
      })
    );
  }
  </code></pre>