@@ -37,6 +37,30 @@ export interface TimeSlot {
3737 hour : number ;
3838}
3939
40+ const teacherStatusUi : Record < string , { label : string ; className : string } > = {
41+ draft : {
42+ label : "Draft" ,
43+ className : "bg-yellow-500/20 text-yellow-300 border border-yellow-500/40" ,
44+ } ,
45+ pending : {
46+ label : "Pending Review" ,
47+ className : "bg-purple-500/20 text-purple-300 border border-purple-500/40" ,
48+ } ,
49+ active : {
50+ label : "Approved" ,
51+ className :
52+ "bg-emerald-500/20 text-emerald-300 border border-emerald-500/40" ,
53+ } ,
54+ rejected : {
55+ label : "Rejected" ,
56+ className : "bg-red-500/20 text-red-300 border border-red-500/40" ,
57+ } ,
58+ blocked : {
59+ label : "Blocked" ,
60+ className : "bg-gray-500/20 text-gray-200 border border-gray-500/40" ,
61+ } ,
62+ } ;
63+
4064export const TeacherProfile = ( ) => {
4165 const { data : profile , isLoading } = useMyProfileQuery ( ) ;
4266 const updateProfileMutation = useUpdateMyProfileMutation ( ) ;
@@ -453,6 +477,19 @@ export const TeacherProfile = () => {
453477 < span className = "text-green-400 text-sm" > Public profile</ span >
454478 </ label >
455479 </ div >
480+ < div className = "mb-6 sm:mb-8" >
481+ < span
482+ className = { `inline-flex items-center rounded-full px-3 py-1 text-xs sm:text-sm font-medium ${
483+ teacherStatusUi [ profile ?. status ?? "draft" ] ?. className ??
484+ "bg-light-500/20 text-light-100 border border-light-500/40"
485+ } `}
486+ >
487+ Account status:{ " " }
488+ { teacherStatusUi [ profile ?. status ?? "draft" ] ?. label ??
489+ profile ?. status ??
490+ "Draft" }
491+ </ span >
492+ </ div >
456493 < div className = "flex flex-col lg:flex-row gap-6 lg:gap-12" >
457494 < ProfileAvatar avatarUrl = { profile ?. profileImageUrl } />
458495 < div className = "flex-1 space-y-4 sm:space-y-6" >
0 commit comments