Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

483
Views
Warning: Failed prop type: The prop `justify` of `ForwardRef(Grid)` is deprecated. Use `justifyContent` instead, the prop was renamed

Can someone help me in solving this error. I am unable to rectify this error. this is what i got in the browser's console

const Cart = ({ cart }) => {
    const classes = useStyles();

    const EmptyCart = () => (
        <Typography variant="subtitle1">
            You have no items in your cart, start adding some!!!
        </Typography>
    );
    const FilledCart = () => (
        <>
            <Grid container spacing={3}>
                {cart.line_items.map((item) => (
                    <Grid item xs={12} sm={4} key={item.id}>
                        <CartItem item={ item }/>
                    </Grid>
                ))}
            </Grid>
            <div className={classes.cardDetails}>
                <Typography variant='h4'>
                    Subtotal: {cart.subtotal.formatted_with_symbol}
                </Typography>
                <Button className={classes.emptyButton} size="large" type="button" variant="contained" color="secondary">Empty cart</Button>
                <Button className={classes.checkoutButton} size="large" type="button" variant="contained" color="primary">Checkout</Button>
            </div>
        </>
    )
    if (!cart.line_items)
        return '.......loading';

    return (<Container>
        <div className={classes.toolbar} />
        <Typography className={classes.title} variant='h3' gutterBottom>
            Your Shopping Cart
        </Typography>
        {!cart.line_items.length ? <EmptyCart /> : <FilledCart />}
    </Container>);
};
export default Cart;
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Note that The prop justify is deprecated, use justifyContent instead. So, replace justify by justifyContent.

Before :

<Grid container **justify="space-between"** alignItems="center" spacing={4}>

After:

<Grid container **justifyContent="space-between"** alignItems="center" spacing={4}>
about 4 years ago · Juan Pablo Isaza Report

0

I was checked official document but no luck, after that I did custom styling in following way and it work fine for me.

Error:

<Grid
  container
  direction="row"
  justifyContent="center"
  alignItems="center"
>

Solution:

<Grid
  container
  direction="row"
  style={{justifyContent:"center"}}
  alignItems="center"
>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!