diff --git a/packages/frontend/src/features/auth/components/auth-form.tsx b/packages/frontend/src/features/auth/components/auth-form.tsx index 320d75d..b6a1d94 100644 --- a/packages/frontend/src/features/auth/components/auth-form.tsx +++ b/packages/frontend/src/features/auth/components/auth-form.tsx @@ -74,7 +74,7 @@ export function AuthForm() { }; return ( -
+
diff --git a/packages/frontend/src/features/auth/components/forgot-password-form.tsx b/packages/frontend/src/features/auth/components/forgot-password-form.tsx index 9e2dd25..2501aaa 100644 --- a/packages/frontend/src/features/auth/components/forgot-password-form.tsx +++ b/packages/frontend/src/features/auth/components/forgot-password-form.tsx @@ -16,9 +16,7 @@ import { Icons } from '@/features/auth/components/icons'; import { useAuth } from '@/features/auth/hooks/use-auth'; import { forgotPasswordSchema, - resetPasswordWithTokenSchema, - ForgotPasswordFormValues, - ResetPasswordWithTokenFormValues + resetPasswordWithTokenSchema } from '@/features/auth/validations/auth.schema'; import Link from 'next/link'; import { IconInput } from '@/shared/components/ui/icon-input'; @@ -59,7 +57,7 @@ const ForgotPasswordFormContent = () => { // Add token validation AFTER the hook if (!isForgotPasswordPage && !token) { return ( -
+

Invalid Reset Link

@@ -91,7 +89,7 @@ const ForgotPasswordFormContent = () => { }; return ( -

+
diff --git a/packages/frontend/src/features/events/components/event-details.tsx b/packages/frontend/src/features/events/components/event-details.tsx index 7254d51..0c269e8 100644 --- a/packages/frontend/src/features/events/components/event-details.tsx +++ b/packages/frontend/src/features/events/components/event-details.tsx @@ -3,7 +3,7 @@ import { Button } from '@/shared/components/ui/button'; import { Card } from '@/shared/components/ui/card'; import { Badge } from '@/shared/components/ui/badge'; -import { Avatar } from '@/shared/components/ui/avatar'; +import { Avatar, AvatarFallback } from '@/shared/components/ui/avatar'; import { Calendar, MapPin, @@ -16,7 +16,6 @@ import { DollarSign, UserIcon } from 'lucide-react'; -import Image from 'next/image'; import { useRouter, usePathname } from 'next/navigation'; import { EventSubscriptionStatus, EventWithHost } from '../types'; import { EventsTypes } from '../lib/validation'; @@ -385,16 +384,24 @@ export const EventDetails = () => {

Hosted by

- - + + {host_image && ( + + )} + {!host_image && ( + + {host_name + ?.split(' ') + .map((n) => n[0]) + .join('') || ''} + + )}
{host_name}
diff --git a/packages/frontend/src/features/events/components/event-form.tsx b/packages/frontend/src/features/events/components/event-form.tsx index 5260b43..66c2da3 100644 --- a/packages/frontend/src/features/events/components/event-form.tsx +++ b/packages/frontend/src/features/events/components/event-form.tsx @@ -186,7 +186,14 @@ const EventForm = () => { setActiveStep(activeStep - 1); }; - const onSubmit = async (data: EventFormValues) => { + const handleStepNavigation = (e: React.FormEvent) => { + e.preventDefault(); + if (activeStep === 1) { + handleNext(); + } + }; + + const handleFormSubmit = async (data: EventFormValues) => { try { const formData = new FormData(); @@ -300,6 +307,8 @@ const EventForm = () => { } }; + const handleFinalSubmit = methods.handleSubmit(handleFormSubmit); + // Show loading state while fetching event data if (isLoadingEvent) { return ( @@ -349,7 +358,12 @@ const EventForm = () => { -
+ {activeStep === 1 ? ( { )} { } rightIcon="arrowRight" label={activeStep === 1 ? 'Next' : eventButtonText} - onClick={activeStep === 1 ? handleNext : undefined} />
diff --git a/packages/frontend/src/features/home/components/home.tsx b/packages/frontend/src/features/home/components/home.tsx index 515c19d..b6fbb85 100644 --- a/packages/frontend/src/features/home/components/home.tsx +++ b/packages/frontend/src/features/home/components/home.tsx @@ -221,7 +221,7 @@ export const Home = () => { }); // Show Select All if admin or all visible threads are owned by user - const showSelectAll = isAdmin || allOwnedByUser; + const showSelectAll = isAdmin || allSelectedOwnedByUser; // Show bulk bar if admin or (thread creator and all selected are theirs) const showBulkBar = someSelected && (isAdmin || allSelectedOwnedByUser); diff --git a/packages/frontend/src/features/home/components/main-card/comments-thread-card.tsx b/packages/frontend/src/features/home/components/main-card/comments-thread-card.tsx index c6f86af..cfa2e5a 100644 --- a/packages/frontend/src/features/home/components/main-card/comments-thread-card.tsx +++ b/packages/frontend/src/features/home/components/main-card/comments-thread-card.tsx @@ -357,34 +357,35 @@ export const CommentsThreadCard = ({ {/* Comment Selection Bulk Bar */} - {threadComments.length > 0 && ( -
-
- - Select All -
- {someSelected && ( -
- - {selectedCommentIds.length} selected - - + {threadComments.length > 0 && + (isAdmin || threadComments.some(isCommentOwner)) && ( +
+
+ + Select All
- )} -
- )} + {someSelected && ( +
+ + {selectedCommentIds.length} selected + + +
+ )} +
+ )} {/* Delete Confirmation Modal */} diff --git a/packages/frontend/src/features/user-profile/api/user-api.ts b/packages/frontend/src/features/user-profile/api/user-api.ts index 56c3c2d..dce3508 100644 --- a/packages/frontend/src/features/user-profile/api/user-api.ts +++ b/packages/frontend/src/features/user-profile/api/user-api.ts @@ -11,7 +11,7 @@ export const userApi = { getUserPublicData: (id: number) => apiMethods.get(`/users/public-data/${id}`), - getUserById: (id: number) => apiMethods.get(`/users/${id}`), + getUserById: (id: number) => apiMethods.get(`/users/id/${id}`), getUserByEmail: (email: string) => apiMethods.get(`/users/email/${email}`), diff --git a/packages/frontend/src/features/user-profile/components/view-profile.tsx b/packages/frontend/src/features/user-profile/components/view-profile.tsx index c1dc417..6450e23 100644 --- a/packages/frontend/src/features/user-profile/components/view-profile.tsx +++ b/packages/frontend/src/features/user-profile/components/view-profile.tsx @@ -106,9 +106,9 @@ export const ViewProfile = ({ slug }: ViewProfileProps) => { name: `${displayedUser?.firstName} ${displayedUser?.lastName}`, avatar: displayedUser?.pictureUploadLink, stats: { - menteesTutored: 24, - groupSessions: 15, - personalSessions: 42 + menteesTutored: displayedUser?.menteesTutored || 0, + groupSessions: displayedUser?.groupSessions || 0, + personalSessions: displayedUser?.personalSessions || 0 }, bio: { label: 'Bio', diff --git a/packages/frontend/src/features/user-profile/types/index.ts b/packages/frontend/src/features/user-profile/types/index.ts index 71a0b73..0c4e092 100644 --- a/packages/frontend/src/features/user-profile/types/index.ts +++ b/packages/frontend/src/features/user-profile/types/index.ts @@ -39,6 +39,9 @@ export interface UserProfile { emailVerified?: boolean; provider?: string; lastLogin?: string; + menteesTutored?: number; + groupSessions?: number; + personalSessions?: number; } export interface UserResponse { diff --git a/packages/frontend/src/shared/components/navigation/main-nav/main-nav.tsx b/packages/frontend/src/shared/components/navigation/main-nav/main-nav.tsx index 03fd4c8..537e0fa 100644 --- a/packages/frontend/src/shared/components/navigation/main-nav/main-nav.tsx +++ b/packages/frontend/src/shared/components/navigation/main-nav/main-nav.tsx @@ -1,4 +1,3 @@ -import Image from 'next/image'; import { IconInput } from '@/shared/components/ui/icon-input'; import BreadcrumbNav from './breadcrumb-nav'; import { @@ -13,6 +12,8 @@ import { useAuth } from '@/features/auth/hooks/use-auth'; import { useRouter } from 'next/navigation'; import { SharedIcons } from '@/shared/components/icons'; import { useUserStore } from '@/features/user-profile/store/index'; +import { Avatar, AvatarFallback } from '@/shared/components/ui/avatar'; +import { ImagePreview } from '@/shared/components/image/image-preview'; export const getImageUrl = (path: string | undefined) => { if (!path || path.includes('undefined')) return '/profile/profile.png'; @@ -50,14 +51,29 @@ export const MainNav = () => {