mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2024-12-22 13:43:03 -05:00
14 lines
258 B
TypeScript
14 lines
258 B
TypeScript
|
export const getUserData = async () => {
|
||
|
const user = figma.currentUser;
|
||
|
if (user) {
|
||
|
figma.ui.postMessage({
|
||
|
type: 'USER_DATA',
|
||
|
data: {
|
||
|
userId: user.id
|
||
|
}
|
||
|
});
|
||
|
} else {
|
||
|
console.warn('Could not get user data');
|
||
|
}
|
||
|
};
|