Skip to content

Commit 91de129

Browse files
authored
removed slug from sheet title anchor
as sheet component is rendered for every cheatsheet page.. the page has already a path like `https://devsonket.com/bootstrap5` here `/bootstrap5` is the path which is the id of current viewing cheatsheet.. sheet component has a title with an anchor tag for every title, in the anchor tag href `${slug}#{title}` is being used... that's why after a refresh /slug#title is added to the URL like this `https://devsonket.com/bootstrap5/bootstrap5#title`
1 parent 5540fb0 commit 91de129

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/components/common/Sheet.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ const SheetTitle = styled.div`
8989
}
9090
`
9191

92-
export const Sheet = ({ title, slug, items, onlyCode }) => (
92+
export const Sheet = ({ title, items, onlyCode }) => (
9393
<SheetContainer id={title}>
9494
<SheetTitle className="sheet-title">
9595
<h3>{title}</h3>
96-
<a href={`${slug}#${title}`}>
96+
<a href={`#${title}`}>
9797
<FiLink />
9898
</a>
9999
</SheetTitle>

0 commit comments

Comments
 (0)