cosmos-explorer/src/Utils/UserUtils.ts
v-darkora e9ea887fe7
[Query Copilot] Pass user email to query feedback (#1516)
* Pass user email to query feedback AB#2501550

* Await page.frame

* Make contact no by default

* Add hook to check if it sohuld render the modal in the main component
2023-07-10 10:59:05 +02:00

15 lines
429 B
TypeScript

import { userContext } from "../UserContext";
import { decryptJWTToken } from "./AuthorizationUtils";
export const getFullName = (): string => {
const { authorizationToken } = userContext;
const { name } = decryptJWTToken(authorizationToken);
return name;
};
export const getUserEmail = (): string => {
const { authorizationToken } = userContext;
const { upn } = decryptJWTToken(authorizationToken);
return upn;
};