forked from polka_billy/porridger
Added user points indicator
This commit is contained in:
@ -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} />
|
||||
))}
|
||||
|
Reference in New Issue
Block a user