Skip to content

Commit

Permalink
pdf view fixed by adding direct link, should be done by pdf viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
abinth11 committed Aug 31, 2023
1 parent 3e4e130 commit 0a0b0fa
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ const PaymentConfirmationModal: React.FC<PaymentModalProps> = ({
</div>
</DialogHeader>
<DialogBody divider>
<Typography variant='body' className='font-semibold' color='gray'>
<Typography variant='paragraph' className='font-semibold text-md' color='gray'>
Please review the details before proceeding:
</Typography>
<Typography variant='body' color='gray' className='mt-2 mb-1'>
<Typography variant='paragraph' color='gray' className='mt-2 mb-1'>
{isFreeCourse ? (
<span className='font-semibold text-green-500'>
This course is free!
Expand All @@ -135,7 +135,7 @@ const PaymentConfirmationModal: React.FC<PaymentModalProps> = ({

)}
</Typography>
<Typography variant='body' color='gray'>
<Typography variant='paragraph' color='gray'>
<span className='font-semibold'>Course Overview:</span><br />
{courseDetails?.overview}
</Typography>
Expand Down
1 change: 1 addition & 0 deletions client/src/components/pages/course-pages/pdf-viewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ interface PdfViewerProps {
}

const PdfViewer: React.FC<PdfViewerProps> = ({ pdfUrl }) => {
console.log(pdfUrl)
return (
<div>
<Document file={pdfUrl}>
Expand Down
16 changes: 9 additions & 7 deletions client/src/components/pages/course-pages/view-course.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,15 @@ const ViewCourseStudent: React.FC = () => {
{expandedIndex === 0 && (
<li className=''>
<ul>
<li
className='p-6 border-b flex items-center cursor-pointer hover:bg-customBlueShade'
onClick={handleLiClick}
>
<IoBookSharp className='mr-2 text-blue-500' />
<span className='flex-1'>Important guidelines</span>
</li>
<Link to={course?.guidelinesUrl ?? ""} target="_blank" rel="noopener noreferrer" >
<li
className='p-6 border-b flex items-center cursor-pointer hover:bg-customBlueShade'
// onClick={handleLiClick}
>
<IoBookSharp className='mr-2 text-blue-500' />
<span className='flex-1'>Important guidelines</span>
</li>
</Link>
{showPdf && (
<PdfViewer pdfUrl={course?.guidelinesUrl ?? ""} />
)}
Expand Down
1 change: 1 addition & 0 deletions server/src/adapters/controllers/courseController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ const courseController = (
cloudService,
dbRepositoryCourse
);
console.log(course)
res.status(200).json({
status: 'success',
message: 'Successfully retrieved the course',
Expand Down

0 comments on commit 0a0b0fa

Please sign in to comment.