getPhoto

Overview

Function that allows for the retrieval of a photo associated with a token if one exists.

Example : Default usage
import { getPhoto } from '@ska-telescope/ska-login-page';

...

const [photo, setPhoto] = React.useState<string | null | undefined>(null);
getPhoto(accessToken).then((response) => {
   setPhoto(response);
});

...

<ButtonUser ... photo={photo} ... />
Properties

Property

Type

Required

Notes

userToken

string

No

IF present, the token will be used, otherwise it will obtain the token of the logged in user.