User Details Drawer

The userDetailsPage function opens a drawer displaying user details after a successful login. This feature is available only if you're using Conscent's login system.

Note: This feature works only with Conscent's login system.

const userDetailsPage = () => {
  console.log('User details page on its way.');
  // @ts-ignore
  const csc = window._csc as any;
  csc('open-user-details-page', {
    onSuccess: (data: any) => {
      console.log(data);
    },
  });
};

Usage:

  1. Pre-requisite: Ensure Conscent's login system is integrated.

  2. Trigger: Call userDetailsPage() after login to open the drawer with user details.

  3. On Success: User details will be available in the data object within the onSuccess callback.

  4. Add a div defining the id to it. for eg: <div id="users"></div>

document.getElementById('profile-icon').addEventListener('click', () => {
  userDetailsPage();
});

Last updated