Skip to content

Commit c279f2d

Browse files
committed
fix the avatar bug in group page
1 parent 86d0d0a commit c279f2d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

peachide/src/app/classes/Group.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useState, useEffect } from 'react';
22
import { motion } from 'framer-motion';
33
import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/card';
4-
import { Avatar, AvatarImage, AvatarFallback } from '@/components/ui/avatar';
4+
import { SmartAvatar } from '@/components/ui/smart-avatar';
55
import { GraduationCap, Clock, MapPin, Users } from 'lucide-react';
66
import { useUserContext } from '../UserEnvProvider';
77
import { Button } from '@/components/ui/button';
@@ -116,9 +116,12 @@ export default function Group({ courseId }: GroupProps) {
116116
<Users className="w-4 h-4 mr-1" />
117117
<span>Members: {group.user_info.length}</span>
118118
{group.user_info.map((user: any) => (
119-
<Avatar key={user.user_id} className="w-8 h-8" title={user.name}>
120-
<AvatarFallback title={user.name}>{user.name.slice(0, 2).toUpperCase()}</AvatarFallback>
121-
</Avatar>
119+
<SmartAvatar
120+
key={user.user_id}
121+
name={user.name}
122+
photo={user.photo}
123+
className="w-8 h-8"
124+
/>
122125
))}
123126
</div>
124127
<div className="mt-4">

0 commit comments

Comments
 (0)