Skip to content
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

#146-api-inserted-to-ReviewsBlock #189

Merged
merged 3 commits into from
Jan 25, 2024

Conversation

JuliaAvramenko
Copy link
Collaborator

Добавила api к компоненту ReviewsBlock

Copy link
Collaborator

@aimenin aimenin left a comment

Choose a reason for hiding this comment

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

Парочка помарок

src/entities/CardReview/ui/CardReview/CardReview.tsx Outdated Show resolved Hide resolved
const initials = useMemo(() => {
return review.name.slice(0, 1)
return name.slice(0, 1)
}, [0, 1])
Copy link
Collaborator

Choose a reason for hiding this comment

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

почему здесь в useMemo 0, 1?

Copy link
Collaborator Author

@JuliaAvramenko JuliaAvramenko Jan 24, 2024

Choose a reason for hiding this comment

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

Сложно ответить на вопрос, так как я не делала этот компонент, Ильфат делал, по- моему, на сколько я поняла, вообще есть Review с нулевым id(pk), в котором нет такого зеленого кружочка , и в нем пишется общий рейтинг магазина , если судить по верстке
image
Но с бэкенда не приходит ревью с нулевым id(pk), поэтому всегда отображается кружочек

src/entities/CardReview/ui/CardReview/CardReview.tsx Outdated Show resolved Hide resolved
src/entities/CardReview/ui/CardReview/CardReview.tsx Outdated Show resolved Hide resolved
src/widgets/ReviewsBlock/model/services/getStoreReviews.ts Outdated Show resolved Hide resolved
src/widgets/ReviewsBlock/model/services/getStoreReviews.ts Outdated Show resolved Hide resolved
src/widgets/ReviewsBlock/ui/ReviewsBlock/ReviewsBlock.tsx Outdated Show resolved Hide resolved
@aimenin aimenin self-requested a review January 24, 2024 14:10
Copy link
Collaborator

@aimenin aimenin left a comment

Choose a reason for hiding this comment

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

👍

@JuliaAvramenko JuliaAvramenko merged commit 27ef5ba into master Jan 25, 2024
1 check passed
@JuliaAvramenko JuliaAvramenko deleted the api-146-insert-to-ReviewsBlock branch January 25, 2024 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants