-
Notifications
You must be signed in to change notification settings - Fork 1
Catalog Page Implementation #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…hange text for no products
…ok for all catalog params, small fixed
| label="Sort By" | ||
| onChange={(e) => onChange(e.target.value)} | ||
| > | ||
| <MenuItem value="name[en-US] asc">Alphabetically, A-Z</MenuItem> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[en-US] - язык в приложении часто используется. Лучше хранить это в переменной
| position: 'absolute', | ||
| inset: 0, | ||
| backgroundImage: `url(${imageUrl})`, | ||
| backgroundImage: `url(https://images.unsplash.com/photo-1664448288134-669f14c3ebbb?q=80&w=2080&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D)`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
почему бы не вынести этот урл в константу куда нибудь?
aissatsana
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Может я просмотрела, но кажется при запросах не хватает обработки ошибок
| import { type Category } from '@commercetools/platform-sdk'; | ||
| import { useCategories } from './useCategories'; | ||
|
|
||
| export const useDefaultCategoryId = (): Category | undefined => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Наверное лучше согласовать функцию по названию файла, и использовать нейминг use для хуков
|
|
||
| const image = product.masterVariant.images?.[0]?.url ?? undefined; | ||
| const placeholder = | ||
| 'https://upload.wikimedia.org/wikipedia/commons/1/14/No_Image_Available.jpg'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Лучше закинуть в проект картинку, не использовать сторонние адреса без необходимости
| [tags] | ||
| ); | ||
|
|
||
| React.useEffect(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
для читаемости и чистоты лучше импортировать сразу хук и обращаться к нему без React (и в других файлах тоже)
Task: link
Screenshot:


Deploy: link
Done 30.05.2025 / deadline 03.06.2025
Score: 100 / 100
Tasks:
4.1 Display Product List (45 points) 📋
4.2 Product Filtering, Sorting, and Searching (65 points) 🔍
4.3 Interactive Product Cards (15 points) 🃏
4.4 Category Navigation (25 points) 🧭
4.5 Tests