Skip to content

Commit

Permalink
fix(plugin-workflow): fix client warning (nocobase#4709)
Browse files Browse the repository at this point in the history
* fix(plugin-workflow): fix client warning

* fix(plugin-workflow): fix build error
  • Loading branch information
mytharcher authored Jun 20, 2024
1 parent a9f1ce7 commit 8a629d0
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,17 @@ const useStyles = createStyles(({ css, token }) => ({
}));

export function StatusButton(props) {
const { status, statusMap, ...others } = props;
const { styles } = useStyles();
let tag = null;
if (typeof props.status !== 'undefined' && props.statusMap?.[props.status]) {
const { icon, color } = props.statusMap[props.status];
if (typeof status !== 'undefined' && statusMap?.[status]) {
const { icon, color } = statusMap[status];
tag = <Tag color={color}>{icon}</Tag>;
}

return (
<Button
{...props}
{...others}
shape="circle"
size="small"
className={classnames(tag ? styles.statusButtonClass : styles.noStatusButtonClass, props.className)}
Expand Down

0 comments on commit 8a629d0

Please sign in to comment.