PIZDEC
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { useState, useEffect, useCallback, useRef, useImperativeHandle, forwardRef } from 'react'
|
import { useState, useEffect, useCallback, useRef, useImperativeHandle, forwardRef } from 'react'
|
||||||
import { useNavigate } from 'react-router-dom'
|
import { useNavigate, Link } from 'react-router-dom'
|
||||||
import { feedApi } from '@/api'
|
import { feedApi } from '@/api'
|
||||||
import type { Activity, ActivityType } from '@/types'
|
import type { Activity, ActivityType } from '@/types'
|
||||||
import { Loader2, ChevronDown, Activity as ActivityIcon, ExternalLink, AlertTriangle, Sparkles, Zap } from 'lucide-react'
|
import { Loader2, ChevronDown, Activity as ActivityIcon, ExternalLink, AlertTriangle, Sparkles, Zap } from 'lucide-react'
|
||||||
@@ -266,7 +266,7 @@ function ActivityItem({ activity, isNew }: ActivityItemProps) {
|
|||||||
`}>
|
`}>
|
||||||
<div className="flex items-start gap-3">
|
<div className="flex items-start gap-3">
|
||||||
{/* Avatar */}
|
{/* Avatar */}
|
||||||
<div className="flex-shrink-0 relative">
|
<Link to={`/users/${activity.user.id}`} className="flex-shrink-0 relative" onClick={(e) => e.stopPropagation()}>
|
||||||
<UserAvatar
|
<UserAvatar
|
||||||
userId={activity.user.id}
|
userId={activity.user.id}
|
||||||
hasAvatar={!!activity.user.avatar_url}
|
hasAvatar={!!activity.user.avatar_url}
|
||||||
@@ -284,14 +284,18 @@ function ActivityItem({ activity, isNew }: ActivityItemProps) {
|
|||||||
`}>
|
`}>
|
||||||
<Icon className="w-2.5 h-2.5 text-white" />
|
<Icon className="w-2.5 h-2.5 text-white" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Link>
|
||||||
|
|
||||||
{/* Content */}
|
{/* Content */}
|
||||||
<div className="flex-1 min-w-0">
|
<div className="flex-1 min-w-0">
|
||||||
<div className="flex items-center gap-2 flex-wrap">
|
<div className="flex items-center gap-2 flex-wrap">
|
||||||
<span className="text-sm font-semibold text-white group-hover:text-neon-400 transition-colors">
|
<Link
|
||||||
|
to={`/users/${activity.user.id}`}
|
||||||
|
className="text-sm font-semibold text-white hover:text-neon-400 transition-colors"
|
||||||
|
onClick={(e) => e.stopPropagation()}
|
||||||
|
>
|
||||||
{activity.user.nickname}
|
{activity.user.nickname}
|
||||||
</span>
|
</Link>
|
||||||
<span className="text-xs text-gray-600">
|
<span className="text-xs text-gray-600">
|
||||||
{formatRelativeTime(activity.created_at)}
|
{formatRelativeTime(activity.created_at)}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -124,11 +124,11 @@ export function LeaderboardPage() {
|
|||||||
`}>
|
`}>
|
||||||
<span className="text-3xl font-bold text-gray-300">2</span>
|
<span className="text-3xl font-bold text-gray-300">2</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="glass rounded-xl p-4 text-center w-28">
|
<Link to={`/users/${topThree[1].user.id}`} className="glass rounded-xl p-4 text-center w-28 hover:border-neon-500/30 transition-colors border border-transparent">
|
||||||
<Medal className="w-6 h-6 text-gray-300 mx-auto mb-2" />
|
<Medal className="w-6 h-6 text-gray-300 mx-auto mb-2" />
|
||||||
<p className="text-sm font-medium text-white truncate">{topThree[1].user.nickname}</p>
|
<p className="text-sm font-medium text-white truncate hover:text-neon-400 transition-colors">{topThree[1].user.nickname}</p>
|
||||||
<p className="text-xs text-gray-400">{topThree[1].total_points} очков</p>
|
<p className="text-xs text-gray-400">{topThree[1].total_points} очков</p>
|
||||||
</div>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 1st place */}
|
{/* 1st place */}
|
||||||
@@ -140,11 +140,11 @@ export function LeaderboardPage() {
|
|||||||
`}>
|
`}>
|
||||||
<Crown className="w-10 h-10 text-yellow-400" />
|
<Crown className="w-10 h-10 text-yellow-400" />
|
||||||
</div>
|
</div>
|
||||||
<div className="glass-neon rounded-xl p-4 text-center w-32">
|
<Link to={`/users/${topThree[0].user.id}`} className="glass-neon rounded-xl p-4 text-center w-32 hover:shadow-[0_0_20px_rgba(34,211,238,0.3)] transition-shadow">
|
||||||
<Star className="w-6 h-6 text-yellow-400 mx-auto mb-2" />
|
<Star className="w-6 h-6 text-yellow-400 mx-auto mb-2" />
|
||||||
<p className="font-semibold text-white truncate">{topThree[0].user.nickname}</p>
|
<p className="font-semibold text-white truncate hover:text-neon-400 transition-colors">{topThree[0].user.nickname}</p>
|
||||||
<p className="text-sm text-neon-400 font-bold">{topThree[0].total_points} очков</p>
|
<p className="text-sm text-neon-400 font-bold">{topThree[0].total_points} очков</p>
|
||||||
</div>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 3rd place */}
|
{/* 3rd place */}
|
||||||
@@ -156,11 +156,11 @@ export function LeaderboardPage() {
|
|||||||
`}>
|
`}>
|
||||||
<span className="text-3xl font-bold text-amber-600">3</span>
|
<span className="text-3xl font-bold text-amber-600">3</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="glass rounded-xl p-4 text-center w-28">
|
<Link to={`/users/${topThree[2].user.id}`} className="glass rounded-xl p-4 text-center w-28 hover:border-neon-500/30 transition-colors border border-transparent">
|
||||||
<Award className="w-6 h-6 text-amber-600 mx-auto mb-2" />
|
<Award className="w-6 h-6 text-amber-600 mx-auto mb-2" />
|
||||||
<p className="text-sm font-medium text-white truncate">{topThree[2].user.nickname}</p>
|
<p className="text-sm font-medium text-white truncate hover:text-neon-400 transition-colors">{topThree[2].user.nickname}</p>
|
||||||
<p className="text-xs text-gray-400">{topThree[2].total_points} очков</p>
|
<p className="text-xs text-gray-400">{topThree[2].total_points} очков</p>
|
||||||
</div>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -231,9 +231,12 @@ export function LeaderboardPage() {
|
|||||||
{/* User info */}
|
{/* User info */}
|
||||||
<div className="relative flex-1 min-w-0">
|
<div className="relative flex-1 min-w-0">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<span className={`font-semibold truncate ${isCurrentUser ? 'text-neon-400' : 'text-white'}`}>
|
<Link
|
||||||
|
to={`/users/${entry.user.id}`}
|
||||||
|
className={`font-semibold truncate hover:text-neon-400 transition-colors ${isCurrentUser ? 'text-neon-400' : 'text-white'}`}
|
||||||
|
>
|
||||||
{entry.user.nickname}
|
{entry.user.nickname}
|
||||||
</span>
|
</Link>
|
||||||
{isCurrentUser && (
|
{isCurrentUser && (
|
||||||
<span className="px-2 py-0.5 text-xs font-medium bg-neon-500/20 text-neon-400 rounded-full border border-neon-500/30">
|
<span className="px-2 py-0.5 text-xs font-medium bg-neon-500/20 text-neon-400 rounded-full border border-neon-500/30">
|
||||||
Вы
|
Вы
|
||||||
|
|||||||
Reference in New Issue
Block a user