Skip to content

Commit afac864

Browse files
author
Sabbir Ahmed
authored
Merge pull request #1011 from Jisan-mia/fix-refresh-prob
fix: after a refresh cheatsheet title anchor not working
2 parents 0bd6a9c + 320c39f commit afac864

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

src/components/Item/Item.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ const Item = ({ data }) => {
3030
{data.contents.map(({ title, items, code: onlyCode }) => (
3131
<Sheet
3232
key={title}
33-
slug={data.slug}
3433
title={title}
3534
onlyCode={onlyCode}
3635
items={items}

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)