Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{data.map(item => (
{
// Using linkToRecord as ReferenceField will
// make a new unnecessary network request
}
{QueryVersion() >= 'v1.2' && (
{ids.map(id => (
}
actionIcon={}
/>
{record.name}
{showArtist ? (
) : (
)}
)
render={(record: any) =>
Authorization.isStationOwner(props.permissions, record.id) && (
<button color="primary">
Edit
</button>
)
}
const LinkOrNot = ({
classes: classesOverride,
linkType,
basePath,
id,
record,
children,
}) => {
const classes = useStyles({ classes: classesOverride })
return linkType === 'edit' || linkType === true ? (
{children}
) : linkType === 'show' ? (
{children}
) : typeof linkType === 'function' ? (
<span> linkType(id, basePath, record)}>{children}</span>
) : (
<span>{children}</span>
)
}
const EditButton = ({ record, basePath }) => {
const translate = useTranslate();
return (
);
};