import { getBackendUrl } from "@services/config/config"; import React from "react"; import styled from "styled-components"; function DocumentPdfActivity({ activity, course }: { activity: any; course: any }) { function getChapterName() { let chapterName = ""; let chapterId = activity.chapter_id; course.chapters.forEach((chapter: any) => { if (chapter.chapter_id === chapterId) { chapterName = chapter.name; } }); return chapterName; } return (

Chapter : {getChapterName()}

{activity.name}