Skip to content

Commit

Permalink
fix project/chat icon could appear without provided link (#947)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaMachina committed Nov 25, 2022
1 parent 9ab6dd0 commit 2e2912e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/metal-laws-joke.md
@@ -0,0 +1,5 @@
---
'nextra-theme-docs': patch
---

fix project/chat icon could appear without provided link
8 changes: 0 additions & 8 deletions packages/nextra-theme-docs/src/components/navbar.tsx
Expand Up @@ -177,10 +177,6 @@ export function Navbar({ flatDirectories, items }: NavBarProps): ReactElement {
>
{renderComponent(config.project.icon)}
</Anchor>
) : config.project.icon ? (
// if no project link is provided, but a component exists, render it
// to allow the client to render their own link
renderComponent(config.project.icon)
) : null}

{config.chat.link ? (
Expand All @@ -191,10 +187,6 @@ export function Navbar({ flatDirectories, items }: NavBarProps): ReactElement {
>
{renderComponent(config.chat.icon)}
</Anchor>
) : config.chat.icon ? (
// if no chat link is provided, but a component exists, render it
// to allow the client to render their own link
renderComponent(config.chat.icon)
) : null}

{renderComponent(config.navbar.extraContent)}
Expand Down

0 comments on commit 2e2912e

Please sign in to comment.