Compare commits

...

1 Commits

Author SHA1 Message Date
Mehak Nasir
60f6871227 Revert "fix: conditionally skipped some API calls and deffered script loading to improve performance"
This reverts commit 0f2ad8b7b4.
2023-02-23 14:36:45 +05:00
3 changed files with 6 additions and 6 deletions

View File

@@ -45,7 +45,7 @@
};
</script>
<script
defer
async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"
id="MathJax-script"
></script>
@@ -54,7 +54,7 @@
<div id="root" class="small"></div>
<!-- begin usabilla live embed code -->
<script defer type="text/javascript">
<script type="text/javascript">
window.lightningjs ||
(function (n) {
var e = "lightningjs";

View File

@@ -71,14 +71,14 @@ export const useSidebarVisible = () => {
return !hideSidebar;
};
export function useCourseDiscussionData(courseId, enableInContextSidebar) {
export function useCourseDiscussionData(courseId) {
const dispatch = useDispatch();
const { authenticatedUser } = useContext(AppContext);
useEffect(() => {
async function fetchBaseData() {
await dispatch(fetchCourseConfig(courseId));
if (!enableInContextSidebar) { await dispatch(fetchCourseBlocks(courseId, authenticatedUser.username)); }
await dispatch(fetchCourseBlocks(courseId, authenticatedUser.username));
}
fetchBaseData();

View File

@@ -50,7 +50,7 @@ export default function DiscussionsHome() {
courseId, postId, topicId, category, learnerUsername,
} = params;
useCourseDiscussionData(courseId, enableInContextSidebar);
useCourseDiscussionData(courseId);
useRedirectToThread(courseId, enableInContextSidebar);
/* Display the content area if we are currently viewing/editing a post or creating one.
@@ -124,7 +124,7 @@ export default function DiscussionsHome() {
</Switch>
)}
</div>
{!enableInContextSidebar && <DiscussionsProductTour />}
<DiscussionsProductTour />
</main>
{!enableInContextSidebar && <Footer />}
</DiscussionContext.Provider>