How to access logged in members profile page?

What is the fault in this code because when I click on button1 I am relocated but it can´t find anything. Same fault with button 2 to get to the account page. Very confusing because I have copied the exact URL for the both pages (not a specific members profile and account URL but to the two dynamic pages.

When I try without code and through a direct database-connection I am relocated to the wrong members profile page (same with account).

import { currentMember } from ‘wix-members’ ;
import wixLocation from ‘wix-location’ ;
import wixUsers from ‘wix-users’ ;

export function myGetCurrentMemberFunction ( options ) {
return currentMember . getMember ( options )
. then (( member ) => {
const memberId = member . _id ;

  **return**  member ; 
}) 
. **catch** (( error ) => { 
  console . error ( error ); 
}) 

}
export function button1_click ( event ) {
wixLocation . to ( /members/profile/{ID} );
}
export function button2_onclick ( event ) {
wixLocation . to ( /members/account/{ID} );
}