Refactored Rating component
Separated annDetails, added to userPage, made actually operating
This commit is contained in:
@ -2,7 +2,7 @@ import { Container } from 'react-bootstrap'
|
||||
|
||||
import { useUser } from '../hooks/api'
|
||||
import { userCategories } from '../assets/userCategories'
|
||||
import { BackHeader, CategoryPreview, Poetry, Points, SignOut } from '../components'
|
||||
import { BackHeader, CategoryPreview, Poetry, Points, SignOut, StarRating } from '../components'
|
||||
import { gotError, gotResponse } from '../hooks/useFetch'
|
||||
|
||||
import styles from '../styles/UserPage.module.css'
|
||||
@ -34,6 +34,13 @@ function UserPage() {
|
||||
)
|
||||
} />
|
||||
|
||||
<div>
|
||||
<h5 className={styles.userRating}>
|
||||
Ваша оценка:
|
||||
<StarRating userId={user.data?.id || 1} />
|
||||
</h5>
|
||||
</div>
|
||||
|
||||
{userCategories.map(cat => (
|
||||
<CategoryPreview key={cat} category={cat} />
|
||||
))}
|
||||
|
Reference in New Issue
Block a user