Skip to content

Commit

Permalink
Merge pull request #518 from EscolaLMS/bugfix/REK-72
Browse files Browse the repository at this point in the history
teachers list
  • Loading branch information
victazzz authored Nov 28, 2024
2 parents f8c684a + aed63a9 commit cb39143
Showing 1 changed file with 26 additions and 19 deletions.
45 changes: 26 additions & 19 deletions src/components/Book/BookTermModal/SelectedTermContent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ const SelectedTermContent = ({
loading,
}: Props) => {
const { t } = useTranslation();
const { author } = consultation;
// @ts-ignore TODO: add to sdk
const { teachers } = consultation;

return (
<>
Expand All @@ -34,24 +35,30 @@ const SelectedTermContent = ({
title={t("ConsultationPage.ConsultationTerm")}
content={formatDate(selectedDate, APP_CONFIG.defaultDateTimeFormat)}
/>
<InfoBox
title={t("ConsultationPage.Expert")}
content={
<Tutor
mobile={isMobile}
avatar={{
alt: `${author.first_name} ${author.last_name}`,
src: `${API_URL}/api/images/img?path=${author.path_avatar}` || "",
}}
title={<></>}
fullName={`${author.first_name} ${author.last_name}`}
rating={{
ratingValue: 5,
}}
description={author.bio}
/>
}
/>
{/* @ts-ignore TODO: add to sdk */}
{teachers.map((teacher) => (
<InfoBox
key={teacher?.id}
title={t("ConsultationPage.Expert")}
content={
<Tutor
mobile={isMobile}
avatar={{
alt: `${teacher?.first_name} ${teacher?.last_name}`,
src:
`${API_URL}/api/images/img?path=${teacher?.path_avatar}` ||
"",
}}
title={<></>}
fullName={`${teacher?.first_name} ${teacher?.last_name}`}
rating={{
ratingValue: 5,
}}
description={teacher?.bio}
/>
}
/>
))}
<Button
mode="secondary"
onClick={onClick}
Expand Down

0 comments on commit cb39143

Please sign in to comment.