Skip to content

Commit

Permalink
Fix key warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Ayers <[email protected]>
  • Loading branch information
smaye81 committed Oct 1, 2024
1 parent 816a6c7 commit 247310b
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 296 deletions.
2 changes: 1 addition & 1 deletion docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ will return the wire error.
Alternatively, if you wish to cancel the operation and immediately stop
the client stream, see [below](#cancel-stream) to cancel the operation.

### How do I cancel a client response stream in Connect-Go?
### How do I cancel a client response stream in Connect-Go? {#cancel-stream}

To cancel and abort a stream, call the cancel function of the underlying
context associated with the stream. This context is provided on stream
Expand Down
32 changes: 13 additions & 19 deletions src/components/home/examples.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,23 +203,23 @@ function CodeBlock({

const lineProps = getLineProps({
line,
key: i,
});

if (lineClassNames[i]) {
lineProps.className += lineClassNames[i].join(" ");
}

const { key: _, ...rest } = lineProps;

return (
<span key={i} {...rest}>
<span key={i} {...lineProps}>
{line.map((token, key) => {
const { key: _, ...restOf } = getTokenProps({
token,
key,
});
return <span key={key} {...restOf} />;
return (
<span
key={key}
{...getTokenProps({
token,
})}
/>
);
})}
<br />
</span>
Expand All @@ -243,23 +243,17 @@ function CodeBlock({
line[0].content = "\n"; // eslint-disable-line no-param-reassign
}

const lineProps = getLineProps({ line, key: i });
const lineProps = getLineProps({ line });
// Do not apply syntax highlighting to console output
delete lineProps.style;

const { key, ...rest } = lineProps;

return (
<span key={i} {...rest}>
<span key={i} {...lineProps}>
{line.map((token, key) => {
const tokenProps = getTokenProps({ token, key });
const tokenProps = getTokenProps({ token });
// Do not apply syntax highlighting to console output
delete tokenProps.style;
const { key: _, ...restOf } = getTokenProps({
token,
key,
});
return <span key={key} {...restOf} />;
return <span key={key} {...tokenProps} />;
})}
</span>
);
Expand Down
88 changes: 0 additions & 88 deletions src/theme/NavbarItem/DocNavbarItem.tsx

This file was deleted.

129 changes: 0 additions & 129 deletions src/theme/NavbarItem/DocsVersionDropdownNavbarItem.tsx

This file was deleted.

58 changes: 0 additions & 58 deletions src/theme/NavbarItem/DocsVersionNavbarItem.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
// This file is not used in compilation. It is here just for a nice editor experience.
"extends": "@tsconfig/docusaurus/tsconfig.json",
"extends": "@docusaurus/tsconfig",
"compilerOptions": {
"jsx": "react",
"baseUrl": ".",
Expand Down

0 comments on commit 247310b

Please sign in to comment.