Skip to content

Commit

Permalink
Merge pull request #331 from Studio-Yandex-Practicum/enhancement_330_…
Browse files Browse the repository at this point in the history
…feedback_page

Доавил breadcrumbs на страницу отзывов
  • Loading branch information
kirill-k88 authored Apr 23, 2024
2 parents 1ba3a96 + 5506362 commit 4aa694b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
9 changes: 5 additions & 4 deletions src/pages/FeedbackPage/FeedbackPage.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
flex-direction: column;
align-items: flex-start;

&__header {
font-size: 25px;
line-height: 1.15;
font-weight: 700;
&__pageDescriptor {
width: 100%;
display: flex;
flex-direction: column;
gap: 10px;
}

&__container {
Expand Down
15 changes: 11 additions & 4 deletions src/pages/FeedbackPage/FeedbackPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import WrapperForMainContent from '@/components/WrapperForMainContent/WrapperFor
import { bodyScrollControl } from '@/shared/libs/helpers/popupHelper'
import { useAppDispatch } from '@/shared/libs/hooks/store'
import { useResize } from '@/shared/libs/hooks/useResize'
import Breadcrumbs from '@/shared/ui/Breadcrumbs/Breadcrumbs'
import { Button, ButtonSize, ButtonTheme } from '@/shared/ui/Button/Button'
import Heading, { HeadingType } from '@/shared/ui/Heading/Heading'
import Heading from '@/shared/ui/Heading/Heading'
import { AveregeMark } from '@/widgets/AveregeMark/AveregeMark'
import { FeedbackForm } from '@/widgets/FeedbackForm/FeedbackForm'
import { FeedbackList } from '@/widgets/FeedbackList/FeedbackList'
Expand All @@ -26,6 +27,11 @@ export const FeedbackPage = () => {
const { isScreenLg } = useResize()
const [showPopup, setShowPopup] = useState(false)

const links = [
{ heading: 'Главная', href: '/' },
{ heading: 'Отзывы о магазине', href: '' }
]

useEffect(() => {
//TODO реализовать пагинацию, временно отображать 1-ую страницу
dispatch(getFeedbacks(1))
Expand All @@ -42,9 +48,10 @@ export const FeedbackPage = () => {
return (
<WrapperForMainContent>
<div className={styles.feedbackpage}>
<Heading type={HeadingType.NORMAL} className={styles.feedbackpage__header}>
Отзывы о магазине
</Heading>
<div className={styles.feedbackpage__pageDescriptor}>
<Heading>Отзывы о магазине</Heading>
<Breadcrumbs links={links} />
</div>
<div className={styles.feedbackpage__container}>
<FeedbackList feedbacks={feedback.feedbacks} />
<div className={styles.feedbackpage__rightcolumn}>
Expand Down

0 comments on commit 4aa694b

Please sign in to comment.