To use the Current Member API, import {currentMember} from the wix-members-frontend module:
Note: The frontend CurrentMember APIs aren't fully functional when previewing a site. View a published version of a site to see their complete functionality.