forked from wangziqi/gongxue-base
chore: commit oxfmt formatting changes and verify artifacts
This commit is contained in:
@@ -8,7 +8,11 @@ interface PermissionButtonProps extends ButtonProps {
|
||||
children: React.ReactNode;
|
||||
}
|
||||
|
||||
const PermissionButton: React.FC<PermissionButtonProps> = ({ permission, children, ...btnProps }) => {
|
||||
const PermissionButton: React.FC<PermissionButtonProps> = ({
|
||||
permission,
|
||||
children,
|
||||
...btnProps
|
||||
}) => {
|
||||
const { hasPermission } = usePermission();
|
||||
if (!hasPermission(permission)) return null;
|
||||
return <Button {...btnProps}>{children}</Button>;
|
||||
|
||||
Reference in New Issue
Block a user