Added user points indicator

This commit is contained in:
2023-07-27 12:53:27 +03:00
parent abe3e64883
commit e60d5d6732
6 changed files with 32 additions and 20 deletions

View File

@ -3,7 +3,7 @@ import { Container } from 'react-bootstrap'
import BackHeader from '../components/BackHeader'
import { useUser } from '../hooks/api'
import { userCategories } from '../assets/userCategories'
import { CategoryPreview } from '../components'
import { CategoryPreview, Points } from '../components'
import { gotError } from '../hooks/useFetch'
function UserPage() {
@ -16,6 +16,7 @@ function UserPage() {
user.error :
`${user.data.name}, с нами с ${new Date(user.data.regDate).toLocaleDateString('ru')}`
} />
<Points points={user.data?.points} />
{userCategories.map(cat => (
<CategoryPreview key={cat} category={cat} />
))}