Open
Conversation
Evgeny2015
commented
Apr 5, 2025
- Компонент модального окна - "shared/modal-window"
- Компонент Layout - "shared/layout"
- Компонент Header - "shared/header"
- Компонент Logo - "shared/logo"
- Компонент краткого отображения операции - "shared/short-operation"
- Компонент полного отображения операции - "shared/edit-operation"
- Кнопка "в корзину" - "shared/add-to-basket-button"
- Компонент краткого отображения товара - "shared/short-product"
- Компонент полного отображения товара - "shared/long-product"
- Компонент товара для корзины - "shared/basket-product"
| Добавить | ||
| </button> | ||
|
|
||
| <div className={cn('button-container', {'invisible': count == 0 })}> |
There was a problem hiding this comment.
{'invisible': count == 0 } стоит вынести в отдельную переменную выше , читаемость лучше
There was a problem hiding this comment.
Другой момент что не нужно скрывать стилями достаточно использовать
if (!count) {
return null
}
| /** | ||
| * Компонент отображения товара для корзины | ||
| */ | ||
| const ShortProduct: FC<BasketProductProps> = ({ price, image, name, ...props }) => { |
There was a problem hiding this comment.
...props конструкция тут не требуется, это используется не много в других ситуациях в лекции Паттерны вам будут рассказывать
src/shared/header/header.tsx
Outdated
| /** | ||
| * Header component | ||
| */ | ||
| const Header: FC<HeaderProps> = ({ ...props }) => { |
There was a problem hiding this comment.
...props убрать стоит во всем проекте
Co-authored-by: Alexsandr Litkevich <50555742+AlexandrLitkevich@users.noreply.github.com>
Homework1
fix: move language and theme providers to its own components
add forms
dev: add routes and redis with thunk
fix: move routes in component and add dialog route
Revert "fix: move routes in component and add dialog route"
# Conflicts: # src/app/App.tsx # src/features/forms/ProductForm/ProductForm.stories.tsx # src/features/forms/ProductForm/ProductForm.tsx # src/pages/product/ProductPage.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.