Skip to content

Commit

Permalink
fix key error
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaslagoni committed Jan 18, 2024
1 parent 78420ab commit 596df37
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 5 additions & 5 deletions library/src/containers/Sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export const Sidebar: React.FunctionComponent = () => {
Messages
</a>
<ul className="text-sm mt-2">
{messages.map(message => (
<li key={message.name()}>
{messages.map((message, index) => (
<li key={`menu-message-list-${message.name() ?? index}`}>
<a
className="flex break-words no-underline text-gray-700 mt-2 hover:text-gray-900"
href={`#message-${message.name()}`}
Expand All @@ -60,8 +60,8 @@ export const Sidebar: React.FunctionComponent = () => {
Schemas
</a>
<ul className="text-sm mt-2">
{schemas.map(schema => (
<li key={schema.id()}>
{schemas.map((schema, index) => (
<li key={`menu-message-list-${schema.id() ?? index}`}>
<a
className="flex break-words no-underline text-gray-700 mt-2 hover:text-gray-900"
href={`#schema-${schema.id()}`}
Expand Down Expand Up @@ -353,7 +353,7 @@ const OperationItem: React.FunctionComponent<OperationItemProps> = ({
});

return (
<li>
<li key={`menu-operation-list-${operationHrefId}`}>
<a
className="flex no-underline text-gray-700 mb-2 hover:text-gray-900"
href={`#${operationHrefId}`}
Expand Down
1 change: 0 additions & 1 deletion library/src/helpers/common.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { ConfigInterface } from '../config';
import { OperationInterface } from '@asyncapi/parser';
import { useConfig, useSpec } from '../contexts';
import { PayloadType } from '../types';
import {
PUBLISH_LABEL_DEFAULT_TEXT,
Expand Down

0 comments on commit 596df37

Please sign in to comment.