Skip to content

Commit 93d5f5a

Browse files
Revert "fix refresh by remove .html in url"
This reverts commit 24e2878. Signed-off-by: Rajesh-Nagarajan-11 <rajeshnagarajan36@gmail.com>
1 parent 24e2878 commit 93d5f5a

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

src/sections/Community/Handbook/handbook-single/HandbookTOC.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ import { IoIosArrowDropdownCircle } from "@react-icons/all-files/io/IoIosArrowDr
88
const HandbookTOC = ({ pages, currentSlug }) => {
99
const [expand, setExpand] = useState(false);
1010

11-
// Helper function to ensure clean URLs without .html extension
12-
const getCleanSlug = (slug) => {
13-
return slug?.replace(/\.html$/, "") || slug;
14-
};
15-
1611
return (
1712
<TOCWrapper>
1813
<div className="go-back">
@@ -43,7 +38,7 @@ const HandbookTOC = ({ pages, currentSlug }) => {
4338
{pages.map((page, index) => (
4439
<li key={index}>
4540
<Link
46-
to={getCleanSlug(page.fields.slug)}
41+
to={page.fields.slug}
4742
className={`toc-sub-heading toc-sub-inline${page.fields.slug === currentSlug ? " active" : ""}`}
4843
>
4944
{page.frontmatter.title}

0 commit comments

Comments
 (0)