mirror of
https://github.com/datahub-project/datahub.git
synced 2025-10-14 18:38:27 +00:00
21 lines
579 B
TypeScript
21 lines
579 B
TypeScript
import React from 'react';
|
|
import { EditOutlined, ReadOutlined, SettingOutlined, UserOutlined } from '@ant-design/icons';
|
|
|
|
export const mapRoleIcon = (roleName) => {
|
|
let icon = <UserOutlined />;
|
|
if (roleName === 'Admin') {
|
|
icon = <SettingOutlined />;
|
|
}
|
|
if (roleName === 'Editor') {
|
|
icon = <EditOutlined />;
|
|
}
|
|
if (roleName === 'Reader') {
|
|
icon = <ReadOutlined />;
|
|
}
|
|
return icon;
|
|
};
|
|
|
|
export const shouldShowGlossary = (canManageGlossary: boolean, hideGlossary: boolean) => {
|
|
return canManageGlossary || !hideGlossary;
|
|
};
|