diff --git a/admin/src/assets/avatars/avatar1.jpg b/admin/src/assets/avatars/avatar1.jpg new file mode 100644 index 00000000..a25cb551 Binary files /dev/null and b/admin/src/assets/avatars/avatar1.jpg differ diff --git a/admin/src/assets/avatars/avatar2.jpg b/admin/src/assets/avatars/avatar2.jpg new file mode 100644 index 00000000..98ea4f10 Binary files /dev/null and b/admin/src/assets/avatars/avatar2.jpg differ diff --git a/admin/src/assets/avatars/avatar3.jpg b/admin/src/assets/avatars/avatar3.jpg new file mode 100644 index 00000000..0ca8cf4c Binary files /dev/null and b/admin/src/assets/avatars/avatar3.jpg differ diff --git a/admin/src/assets/avatars/avatar4.jpg b/admin/src/assets/avatars/avatar4.jpg new file mode 100644 index 00000000..ed8b09ec Binary files /dev/null and b/admin/src/assets/avatars/avatar4.jpg differ diff --git a/admin/src/assets/avatars/avatar5.jpg b/admin/src/assets/avatars/avatar5.jpg new file mode 100644 index 00000000..288c6335 Binary files /dev/null and b/admin/src/assets/avatars/avatar5.jpg differ diff --git a/admin/src/pages/Comments.tsx b/admin/src/pages/Comments.tsx index 0717b62d..3a31be3a 100644 --- a/admin/src/pages/Comments.tsx +++ b/admin/src/pages/Comments.tsx @@ -97,7 +97,7 @@ const Comments = () => {
- profile-pic + profile-pic

diff --git a/admin/src/pages/Favorites.tsx b/admin/src/pages/Favorites.tsx index 7677a19a..406b1344 100644 --- a/admin/src/pages/Favorites.tsx +++ b/admin/src/pages/Favorites.tsx @@ -67,7 +67,7 @@ const Favorites = () => { {favoritePosts.map(favorite => ( - profile-pic + profile-pic

diff --git a/admin/src/pages/Reactions.tsx b/admin/src/pages/Reactions.tsx index b007dcdd..555d0812 100644 --- a/admin/src/pages/Reactions.tsx +++ b/admin/src/pages/Reactions.tsx @@ -69,7 +69,7 @@ const Reactions = () => { {reactions.map(reaction => ( - profile-pic + profile-pic
diff --git a/admin/src/pages/Users.tsx b/admin/src/pages/Users.tsx index 431efd13..2f05513a 100644 --- a/admin/src/pages/Users.tsx +++ b/admin/src/pages/Users.tsx @@ -24,6 +24,7 @@ const Users = () => { }); setAllUsers(response.data.allUsers.reverse()); setLoading(false); + console.log(response.data.allUsers) } catch (error) { console.error("Error fetching users:", error); setLoading(true); @@ -108,7 +109,7 @@ const Users = () => { {allUsers.map(user => ( - profile-pic + profile-pic
{user.username} diff --git a/admin/src/types.ts b/admin/src/types.ts index 6da377d5..103bbc1a 100644 --- a/admin/src/types.ts +++ b/admin/src/types.ts @@ -67,6 +67,7 @@ export interface IFavoritePost { id: string; username: string; email: string; + avatar?:string; }; post: { id: string; diff --git a/backend/src/routes/admin/controller.ts b/backend/src/routes/admin/controller.ts index f4d59bf6..4436fc30 100644 --- a/backend/src/routes/admin/controller.ts +++ b/backend/src/routes/admin/controller.ts @@ -130,6 +130,7 @@ export const allUserForAdmin = async (req: Request, res:Response) => { posts:true, createdAt:true, comments:true, + avatar:true, following: { select: { id: true @@ -167,6 +168,7 @@ export const getAdminPostsController = async (req: Request, res: Response) => { select: { username: true, email: true, + avatar:true }, }, }, @@ -486,6 +488,7 @@ export const getPostReactionsController = async (req: Request, res: Response) => id: true, username: true, email: true, + avatar:true }, }, post: { @@ -527,7 +530,8 @@ export const getFavoritesController = async (req: Request, res: Response) => { select: { id: true, username: true, - email: true + email: true, + avatar:true } }, post: { diff --git a/frontend/src/components/TestimonialSlider.tsx b/frontend/src/components/TestimonialSlider.tsx index 1b8a5bb4..423d6d22 100644 --- a/frontend/src/components/TestimonialSlider.tsx +++ b/frontend/src/components/TestimonialSlider.tsx @@ -111,7 +111,7 @@ const TestimonialSlider: React.FC = () => { {testimonials.slice(currentIndex, currentIndex + slidesToShow).map((testimonial, index) => (
{`${testimonial.author}'s