From 91de129080510ed4e040a9f1903eebe39857b177 Mon Sep 17 00:00:00 2001 From: Jisan Mia <61211600+Jisan-mia@users.noreply.github.com> Date: Fri, 6 Oct 2023 23:49:45 +0600 Subject: [PATCH 1/2] 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` --- src/components/common/Sheet.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/common/Sheet.js b/src/components/common/Sheet.js index e63f1bdd1..045df408e 100644 --- a/src/components/common/Sheet.js +++ b/src/components/common/Sheet.js @@ -89,11 +89,11 @@ const SheetTitle = styled.div` } ` -export const Sheet = ({ title, slug, items, onlyCode }) => ( +export const Sheet = ({ title, items, onlyCode }) => (

{title}

- +
From 320c39f123a30cc3fbc300f7e8291ce9cd2c13ea Mon Sep 17 00:00:00 2001 From: Jisan Mia <61211600+Jisan-mia@users.noreply.github.com> Date: Fri, 6 Oct 2023 23:57:10 +0600 Subject: [PATCH 2/2] removed slug props of Sheet as it isn't required now --- src/components/Item/Item.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/Item/Item.js b/src/components/Item/Item.js index a76a622dc..9a081a52e 100644 --- a/src/components/Item/Item.js +++ b/src/components/Item/Item.js @@ -30,7 +30,6 @@ const Item = ({ data }) => { {data.contents.map(({ title, items, code: onlyCode }) => (