Skip to content

Commit

Permalink
docs: fixed highlight in docs (#1721)
Browse files Browse the repository at this point in the history
Co-authored-by: Jonas Lagoni <jonas-lt@live.dk>
  • Loading branch information
officialasishkumar and jonaslagoni authored Jan 9, 2024
1 parent 89a0f6e commit e4c4d6c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modelina-website/src/components/docs/Docs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ const Docs: React.FC<ModelinaDocsProps> = ({ source, slug, router }) => {
* Render the menu items dynamically in a depth first approach
*/
const renderMenuTree = (value: any, isRoot: boolean) => {
const isSelected = value.slug === `/docs/${slug}`;
const isSelected = value.slug === `${slug}`;
if (value.type === 'dir') {
const hasRootReadme = value.content !== null;
let headerReadme;
if (hasRootReadme) {
headerReadme = (
<li
key={value.slug}
className={`cursor-pointer ${isSelected && 'bg-sky-500/[.3]'} p-2`}
className={`cursor-pointer hover:bg-sky-500/[.3] ${isSelected && 'bg-sky-500/[.3]'} p-2`}
onClick={() => {
setShowMenu(false);
}}
Expand All @@ -59,7 +59,7 @@ const Docs: React.FC<ModelinaDocsProps> = ({ source, slug, router }) => {
return (
<li
key={value.slug}
className={`cursor-pointer ${isSelected && 'bg-sky-500/[.3]'} p-2`}
className={`cursor-pointer hover:bg-sky-500/[.3] ${isSelected && 'bg-sky-500/[.3]'} p-2`}
onClick={() => {
setShowMenu(false);
}}
Expand Down

0 comments on commit e4c4d6c

Please sign in to comment.