File tree Expand file tree Collapse file tree 6 files changed +90
-77
lines changed Expand file tree Collapse file tree 6 files changed +90
-77
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import { Web } from "@litespace/utils/routes";
1313import  cn  from  "classnames" ; 
1414import  {  isEmpty  }  from  "lodash" ; 
1515import  React  from  "react" ; 
16- import  {  Link  }  from  "react-router-dom" ; 
16+ import  {  Link ,   useNavigate  }  from  "react-router-dom" ; 
1717import  {  useFindTutorRatings  }  from  "@litespace/headless/rating" ; 
1818
1919const  MAXIMUM_CARD_TOPICS_NUM  =  4 ; 
@@ -42,6 +42,7 @@ export const TutorCard: React.FC<{
4242  cardHeight, 
4343} )  =>  { 
4444  const  intl  =  useFormatMessage ( ) ; 
45+   const  navigate  =  useNavigate ( ) ; 
4546
4647  return  ( 
4748    < Link 
@@ -153,21 +154,22 @@ export const TutorCard: React.FC<{
153154        > 
154155          { intl ( "tutor-card.book-now" ) } 
155156        </ Button > 
156-         < Link 
157-           to = { router . web ( { 
158-             route : Web . TutorProfile , 
159-             id : tutorId , 
160-           } ) } 
157+         < Button 
158+           htmlType = "button" 
159+           className = "w-full md:hidden mt-auto text-body font-medium" 
160+           variant = "secondary" 
161+           size = { buttonSize } 
162+           onClick = { ( )  => 
163+             navigate ( 
164+               router . web ( { 
165+                 route : Web . TutorProfile , 
166+                 id : tutorId , 
167+               } ) 
168+             ) 
169+           } 
161170        > 
162-           < Button 
163-             htmlType = "button" 
164-             className = "w-full md:hidden mt-auto text-body font-medium" 
165-             variant = "secondary" 
166-             size = { buttonSize } 
167-           > 
168-             { intl ( "tutor-card.show-profile" ) } 
169-           </ Button > { " " } 
170-         </ Link > 
171+           { intl ( "tutor-card.show-profile" ) } 
172+         </ Button > { " " } 
171173      </ div > 
172174    </ Link > 
173175  ) ; 
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import { Link } from "react-router-dom";
1717import  {  useTutors  }  from  "@litespace/headless/tutor" ; 
1818import  {  Tabs  }  from  "@litespace/ui/Tabs" ; 
1919import  {  track  }  from  "@/lib/analytics" ; 
20+ import  {  Typography  }  from  "@litespace/ui/Typography" ; 
2021
2122const  StudentDashboard : React . FC  =  ( )  =>  { 
2223  const  mq  =  useMediaQuery ( ) ; 
@@ -257,7 +258,11 @@ const LearningApproachMobile = () => {
257258
258259  return  ( 
259260    < div  className = "block md:hidden" > 
261+       < Typography  className = "mb-2 text-subtitle-2 font-bold"  tag = { "h1" } > 
262+         { intl ( "student-dashboard.learning-approach.title" ) } 
263+       </ Typography > 
260264      < Accordion 
265+         defaultValue = { items [ 0 ] . id } 
261266        onValueChange = { ( value )  =>  { 
262267          const  item  =  items . find ( ( item )  =>  item . id  ===  value ) ; 
263268          if  ( ! item )  return ; 
Original file line number Diff line number Diff line change @@ -14,13 +14,15 @@ import { Typography } from "@/components/Typography";
1414export  const  Accordion : React . FC < { 
1515  items : AccordionItem [ ] ; 
1616  onValueChange ?: ( value : string )  =>  void ; 
17- } >  =  ( {  items,  onValueChange } )  =>  { 
17+   defaultValue ?: string ; 
18+ } >  =  ( {  items,  defaultValue,  onValueChange } )  =>  { 
1819  return  ( 
1920    < Root 
2021      collapsible 
2122      type = "single" 
2223      className = { cn ( "flex flex-col w-full rounded-2xl overflow-hidden gap-2" ) } 
2324      onValueChange = { onValueChange } 
25+       defaultValue = { defaultValue } 
2426    > 
2527      { items . map ( ( item )  =>  ( 
2628        < Item 
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ export const Dialog: React.FC<{
163163          variant  ===  "default"  ? ( 
164164            < > 
165165              < Optional  show = { ! hiddenTitle } > 
166-                 < div  className = "flex justify-between items-center w-full" > 
166+                 < div  className = "flex justify-between items-center md:items-start  w-full" > 
167167                  < Title > { title } </ Title > 
168168                  < Optional  show = { ! ! close } > 
169169                    < Close 
Original file line number Diff line number Diff line change @@ -345,7 +345,10 @@ export const ManageLessonDialog: React.FC<{
345345            < Typography  tag = "p"  className = "text-caption font-bold" > 
346346              { intl ( "book-lesson.title-1" ) } 
347347            </ Typography > 
348-             < Typography  tag = "p"  className = "text-tiny text-natural-600" > 
348+             < Typography 
349+               tag = "p" 
350+               className = "text-tiny md:max-w-[340px] text-natural-600" 
351+             > 
349352              { intl ( "book-lesson.title-2" ) } 
350353            </ Typography > 
351354          </ div > 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments