keiron-profile
v1.4.0
Published
This library provides a profile component useful for all the suites
Downloads
258
Readme
Keiron Profile
This library provides a profile component useful for all the suites
Setup
In your front proyect run
yarn add keiron-profile
You need to specify 2 additional env vars in your project:
APP_API_URL_KEIRON_PROFILE=
APPLICATION_KEIRON_API_PREFIX_KEIRON_PROFILE=
Example of use
import React from "react"
import { Profile } from "keiron-profile"
import { TOKEN_KEY, APPLICATION_ID } from "common/config/constants"
function ProfilePage(): JSX.Element {
const token = localStorage.getItem(TOKEN_KEY)
if (token === null) {
return <></>
}
return <Profile tokenKey={TOKEN_KEY} application={APPLICATION_ID} />
}
export default ProfilePage