- {images.length > 1 ? (
+ {images.length > 1 && (
<>
{/* Левая зона для переключения на предыдущее изображение */}
0) {
handlePrev()
+ } else {
+ openFullView()
}
}}
- style={{ cursor: currentImageIndex > 0 ? 'pointer' : 'default' }}
+ style={{ cursor: 'pointer' }}
/>
{/* Правая зона для переключения на следующее изображение */}
@@ -221,9 +223,11 @@ export default function PostCard({ post, currentUser, onUpdate }) {
e.stopPropagation()
if (currentImageIndex < images.length - 1) {
handleNext()
+ } else {
+ openFullView()
}
}}
- style={{ cursor: currentImageIndex < images.length - 1 ? 'pointer' : 'default' }}
+ style={{ cursor: 'pointer' }}
/>
@@ -236,15 +240,6 @@ export default function PostCard({ post, currentUser, onUpdate }) {
))}
>
- ) : (
- /* Если одно изображение, вся область открывает fullview */
-
{
- e.stopPropagation()
- openFullView()
- }}
- />
)}
{/* Индикатор что можно открыть fullview */}
diff --git a/frontend/src/pages/UserProfile.css b/frontend/src/pages/UserProfile.css
index 4e86e4b..a5e7b81 100644
--- a/frontend/src/pages/UserProfile.css
+++ b/frontend/src/pages/UserProfile.css
@@ -86,10 +86,11 @@
.user-stats {
display: flex;
+ flex-direction: row;
align-items: center;
+ justify-content: center;
gap: 24px;
width: 100%;
- justify-content: center;
padding-top: 16px;
border-top: 1px solid var(--divider-color);
}
@@ -98,11 +99,12 @@
display: flex;
flex-direction: column;
align-items: center;
+ justify-content: center;
gap: 4px;
cursor: pointer;
transition: opacity 0.2s;
- flex: 1;
- max-width: 120px;
+ flex: 0 0 auto;
+ min-width: 80px;
}
.stat-item:active {
@@ -114,12 +116,14 @@
font-weight: 700;
color: var(--text-primary);
line-height: 1.2;
+ text-align: center;
}
.stat-label {
font-size: 14px;
color: var(--text-secondary);
line-height: 1.2;
+ text-align: center;
}
.stat-divider {
@@ -127,6 +131,7 @@
height: 40px;
background: var(--divider-color);
flex-shrink: 0;
+ flex-grow: 0;
}
.follow-btn {