Skip to content

Commit

Permalink
Refactor MainContent component to correctly retrieve page label
Browse files Browse the repository at this point in the history
  • Loading branch information
alon710 committed Oct 7, 2024
1 parent be962e4 commit 32384e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/layout/MainContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function MainContent({
sideLinks,
}: MainContentProps) {
const pageLabel =
links?.[currentPath?.split("/").slice(0, 3).join("/")].label;
links?.[currentPath?.split("/").slice(0, 3).join("/")]?.label;
return (
<div className="mx-auto grid w-full max-w-6xl items-start gap-6 md:grid-cols-[180px_1fr] lg:grid-cols-[250px_1fr]">
{sideLinks && (
Expand Down

0 comments on commit 32384e1

Please sign in to comment.