Skip to content

Sprint-4 basket page layout#45

Merged
euguenia merged 7 commits intorelease_basket-about_usfrom
sprint-4_basket-page_layout
Sep 12, 2023
Merged

Sprint-4 basket page layout#45
euguenia merged 7 commits intorelease_basket-about_usfrom
sprint-4_basket-page_layout

Conversation

@Nargiza14
Copy link
Collaborator

@Nargiza14 Nargiza14 commented Sep 10, 2023

Sprint [sprint #4]

Task

Trello task link1
Trello task link2
Trello task link3
Trello task link4

Summary

  1. Done 11.09.2023 / Deadline 19.09.2023
  2. Score 10/10

Changelog

  • add Basket Page layout
  • add "Clear Cart" button
  • add Catalog Link to Empty Cart Message
  • display message for Empty Shopping Cart

Screenshot

Снимок экрана 2023-09-11 в 00 37 39 Снимок экрана 2023-09-11 в 01 55 33

"@mui/icons-material": "^5.14.3",
"@mui/material": "^5.14.4",
"@reduxjs/toolkit": "^1.9.5",
"@types/react-redux": "^7.1.26",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need react-redux types, we use RTK

sx={{ backgroundColor: 'yellowgreen', color: 'green', mt: '5%' }}
>
<KeyboardBackspaceIcon width="20" />
<Box component="span" onClick={() => navigate('/products')}>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It.s better to use onClick action on Button component

export const BasketPage: FC = () => {
const navigate = useNavigate();
return (
<Container className="container" sx={{ textAlign: 'center', mt: '5%' }}>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the reason of useing className? there are no styles imported
in case of styles in another scss file it's better to import styles file as module and use dynamic styles as className={styles.container}. so we can reuse the same classnames all over the application with different styles in different components. And on production components will have different classNames

sx={{ border: '1px solid grey', fontSize: '10px' }}
>
<KeyboardBackspaceIcon width="20" />
<Box component="span" onClick={() => navigate('/products')}>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same.
use action onClick on button, its's better way

<Grid item className="cart-product-quantity" xs={2.8} alignSelf="center" display="flex">
<Button sx={{ minWidth: 'min-content', backgroundColor: 'lightgrey' }}>-</Button>
<Typography className="count" padding="0.7rem 0">
1
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to use variables instead of using "magic numbers"

@euguenia euguenia merged commit ad4692d into release_basket-about_us Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants