Changeset a8f4a2d for chapterx-frontend/src/pages/profile/ProfilePage.tsx
- Timestamp:
- 06/24/26 16:51:52 (11 days ago)
- Branches:
- main
- Children:
- 3ae4bab
- Parents:
- 99c1e45
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapterx-frontend/src/pages/profile/ProfilePage.tsx
r99c1e45 ra8f4a2d 1 1 import React, { useState, useEffect } from 'react' 2 2 import { useParams, useNavigate } from 'react-router-dom' 3 import { BookOpen, Heart, Calendar, MessageCircle } from 'lucide-react'3 import { BookOpen, Heart, Calendar, MessageCircle, Eye } from 'lucide-react' 4 4 import { useAuthStore } from '../../store/authStore' 5 5 import { useStoryStore } from '../../store/storyStore' … … 76 76 const totalLikes = userStories.reduce((acc, s) => acc + s.total_likes, 0) 77 77 const totalComments = userStories.reduce((acc, s) => acc + s.total_comments, 0) 78 const totalViews = userStories.reduce((acc, s) => acc + s.total_views, 0) 78 79 const allGenres = [...new Set(userStories.flatMap(s => s.genres))] 79 80 … … 120 121 121 122 {/* Stats */} 122 <div className="grid grid-cols- 3gap-4 mb-8">123 <div className="grid grid-cols-2 sm:grid-cols-4 gap-4 mb-8"> 123 124 {[ 124 125 { icon: <BookOpen size={16} className="text-indigo-400" />, value: userStories.length, label: 'Stories' }, 125 126 { icon: <Heart size={16} className="text-rose-400" />, value: totalLikes.toLocaleString(), label: 'Likes' }, 126 127 { icon: <MessageCircle size={16} className="text-amber-400" />, value: totalComments, label: 'Comments' }, 128 { icon: <Eye size={16} className="text-cyan-400" />, value: totalViews.toLocaleString(), label: 'Views' }, 127 129 ].map(s => ( 128 130 <div key={s.label} className="bg-slate-800 border border-slate-700 rounded-xl p-4 text-center">
Note:
See TracChangeset
for help on using the changeset viewer.
