Skip to content

Commit 0e5e978

Browse files
committed
fix: update model info on device change
1 parent 5713f47 commit 0e5e978

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/component/DescribeModel.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import { WhenToggled } from './WhenToggled.jsx'
1010

1111
export const DescribeModel = (props: { model: ModelID }) => {
1212
const location = useNavigation()
13-
const model = models[props.model]
13+
const model = () => models[props.model]
1414
return (
1515
<aside class="model-definition boxed" title="Model">
1616
<header class="pad">
1717
<h3>
1818
<Documentation size={20} strokeWidth={1} />
19-
{model.about.title}
19+
{model().about.title}
2020
</h3>
2121
<ToggleButton title="definition" id="describe-model" />
2222
</header>
@@ -35,7 +35,7 @@ export const DescribeModel = (props: { model: ModelID }) => {
3535
},
3636
],
3737
})}
38-
title={`Search for all ${model.about.title} devices`}
38+
title={`Search for all ${model().about.title} devices`}
3939
>
4040
<Search strokeWidth={1} size={20} />
4141
</a>
@@ -47,7 +47,7 @@ export const DescribeModel = (props: { model: ModelID }) => {
4747
<dt>
4848
<span class="info">Description</span>
4949
</dt>
50-
<dd>{model.about.description}</dd>
50+
<dd>{model().about.description}</dd>
5151
<dt>
5252
<span class="info">Source</span>
5353
</dt>

0 commit comments

Comments
 (0)