Added poetry picture, fixed spacing on UserPage

This commit is contained in:
2023-08-09 14:25:50 +03:00
parent 6478b45301
commit fa98b392a8
5 changed files with 26 additions and 27 deletions

View File

@ -7,7 +7,7 @@ function Poetry() {
const poetry = usePoetry()
return (
<div className={styles.container}>
<section>
<h4 className='fw-bold'>Поэзия</h4> {
gotResponse(poetry) ? (
gotError(poetry) ? (
@ -26,6 +26,7 @@ function Poetry() {
}}
/>
<p><em>{poetry.data.author}</em></p>
<img src={`/poem_pic/${poetry.data.id}`} alt='Иллюстрация' />
</>
)
) : (
@ -33,7 +34,7 @@ function Poetry() {
)
}
</div>
</section>
)
}

View File

@ -7,9 +7,6 @@ type PointsProps = {
}
const styles = {
container: {
paddingBottom: 8,
} as CSSProperties,
points: {
float: 'right',
} as CSSProperties,
@ -22,18 +19,16 @@ const styles = {
function Points({ points }: PointsProps) {
return (
<div style={styles.container}>
<h5>
Набрано очков:
<span style={styles.points}>
<img
style={styles.icon}
src={handStarsIcon}
alt='Иконка руки, дающей звёзды' />
{points}
</span>
</h5>
</div>
<h5>
Набрано очков:
<span style={styles.points}>
<img
style={styles.icon}
src={handStarsIcon}
alt='Иконка руки, дающей звёзды' />
{points}
</span>
</h5>
)
}

View File

@ -37,6 +37,7 @@ const styles = {
objectFit: 'contain',
borderRadius: 12,
marginBottom: 5,
maxWidth: 'inherit',
} as CSSProperties,
title: {
overflow: 'hidden',