From d141d1c30e2861b250e211eb6a0828a841f9d2ef Mon Sep 17 00:00:00 2001 From: Misal-Ambasta Date: Mon, 30 Jun 2025 13:37:29 +0530 Subject: [PATCH 1/2] fixed: #1841-sidebar-checbox-bug --- src/components/Sidebar.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index eb6bd9824..8f0d36521 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -1,6 +1,6 @@ 'use client'; import React, { useRef } from 'react'; -import { usePathname } from 'next/navigation'; +import { usePathname, useRouter } from 'next/navigation'; import { Accordion, AccordionContent, @@ -255,7 +255,7 @@ export function Sidebar({
{' '}

- Course Content + Course Content1

) => { @@ -294,8 +295,9 @@ function Check({ content }: { content: any }) { const newState = !completed; setCompleted(newState); await handleMarkAsCompleted(newState, content.id); + router.refresh(); // Soft refresh the page to get new data }, - [completed, content.id], + [completed, content.id, router], ); return ( From 0cfaba9f8e85db8e56b146596787adc28628500a Mon Sep 17 00:00:00 2001 From: Misal-Ambasta Date: Mon, 30 Jun 2025 14:14:40 +0530 Subject: [PATCH 2/2] typo fix --- src/components/Sidebar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index 8f0d36521..8a4f9d492 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -255,7 +255,7 @@ export function Sidebar({
{' '}

- Course Content1 + Course Content