Files
Investidor-V2/resources/js/lib/participation-identity.ts
T

15 lines
460 B
TypeScript

export function participationIdentity(): { name: string; email: string } {
try {
const value = JSON.parse(
sessionStorage.getItem('investemoz-participation-identity') ??
'null',
);
return {
name: typeof value?.name === 'string' ? value.name : '',
email: typeof value?.email === 'string' ? value.email : '',
};
} catch {
return { name: '', email: '' };
}
}