diff --git a/examples/demo/src/categories/LinkToRelatedProducts.js b/examples/demo/src/categories/LinkToRelatedProducts.js index a7c27f338cb..a706dee34d5 100644 --- a/examples/demo/src/categories/LinkToRelatedProducts.js +++ b/examples/demo/src/categories/LinkToRelatedProducts.js @@ -1,22 +1,23 @@ import React from 'react'; import Button from '@material-ui/core/Button'; -import { withStyles } from '@material-ui/core/styles'; +import { makeStyles } from '@material-ui/core/styles'; import { Link } from 'react-router-dom'; import { useTranslate } from 'react-admin'; import { stringify } from 'query-string'; import products from '../products'; -const styles = { +const useStyles = makeStyles({ icon: { paddingRight: '0.5em' }, link: { display: 'inline-flex', alignItems: 'center', }, -}; +}); -const LinkToRelatedProducts = ({ classes, record }) => { +const LinkToRelatedProducts = ({ record }) => { const translate = useTranslate(); + const classes = useStyles(); return (