diff --git a/frontend/src/components/TruncatedDescription/TruncatedDescription.tsx b/frontend/src/components/TruncatedDescription/TruncatedDescription.tsx index dcf3fa607..1e76f627e 100644 --- a/frontend/src/components/TruncatedDescription/TruncatedDescription.tsx +++ b/frontend/src/components/TruncatedDescription/TruncatedDescription.tsx @@ -9,7 +9,7 @@ export default function TruncatedDescription({ content: string; maxCharacters: number; }) { - + const [showFullContent, setShowFullContent] = useState(false); const [exceed, setExceed] = useState(false); const [shortenedContent, setShortenedContent] = useState(" "); @@ -17,7 +17,7 @@ export default function TruncatedDescription({ /** * If the content exceeds the maxCharacters, find the next whitespace * and make the cutoff point there so the break does not happen mid-word - * + * * If the new cutoff point is the end of the entire content, make it so * the See More/Less button does not appear */ @@ -35,7 +35,7 @@ export default function TruncatedDescription({ newMax++; index++; } - + if (index === content.length) { setShortenedContent(content); } else { @@ -52,11 +52,11 @@ export default function TruncatedDescription({ return (
-

+

{showFullContent ? content : shortenedContent}

- {exceed && + {exceed && (
); } diff --git a/frontend/src/components/UserReports/UserReports.tsx b/frontend/src/components/UserReports/UserReports.tsx index 298c33737..6141e827f 100644 --- a/frontend/src/components/UserReports/UserReports.tsx +++ b/frontend/src/components/UserReports/UserReports.tsx @@ -10,6 +10,7 @@ import { } from "react"; import Dropdown from "../Dropdown/Dropdown"; import Pagination from "../Pagination/Pagination"; +import ReviewCard from "../ReviewCard/ReviewCard"; type STATUS = { UNSEEN: boolean; @@ -182,11 +183,15 @@ export default function UserReports({ ))}
{/* Pagination */} - setPage(page)} - /> + {reports.length > 0 ? ( + setPage(page)} + /> + ) : ( +
No reports made yet.
+ )} ); } diff --git a/frontend/src/components/UserReviews/UserReviews.tsx b/frontend/src/components/UserReviews/UserReviews.tsx index 129f6c970..9638d3193 100644 --- a/frontend/src/components/UserReviews/UserReviews.tsx +++ b/frontend/src/components/UserReviews/UserReviews.tsx @@ -185,11 +185,15 @@ export default function UserReviews({ )} {/* Pagination */} - setPage(page)} - /> + {reviews.length > 0 ? ( + setPage(page)} + /> + ) : ( +
No courses reviewed yet.
+ )} ); }