Skip to content

Commit

Permalink
Merge pull request #96 from reubenmiller/fix-user-context-code-block-…
Browse files Browse the repository at this point in the history
…title

fix(user-context): pass title through to code block
  • Loading branch information
reubenmiller authored Dec 16, 2024
2 parents 8d8855a + 8316d15 commit 7e6a9af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/UserContext/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import CodeBlock from '@theme/CodeBlock';
import { useReadLocalStorage } from 'usehooks-ts';

export default function UserContext(props={}) {
const {children={}, language="sh"} = props;
const {children={}, language="sh", title=""} = props;
// Common
const deviceId = useReadLocalStorage('DEVICE_ID', props.deviceId || 'tedge001');

Expand All @@ -30,7 +30,7 @@ export default function UserContext(props={}) {
;
return (
<div>
<CodeBlock language={language} >
<CodeBlock language={language} title={title}>
{code}
</CodeBlock>
</div>
Expand Down

0 comments on commit 7e6a9af

Please sign in to comment.