Include version in renderHtml context

This commit is contained in:
Misode
2021-11-21 03:56:03 +01:00
parent 43d1b7dbcc
commit 872a03d44a
2 changed files with 30 additions and 28 deletions

View File

@@ -11,7 +11,7 @@ type TreePanelProps = {
blockStates: BlockStateRegistry | null,
onError: (message: string) => unknown,
}
export function Tree({ lang, model, blockStates, onError }: TreePanelProps) {
export function Tree({ lang, version, model, blockStates, onError }: TreePanelProps) {
if (!model || !blockStates || lang === 'none') return <></>
const [error] = useErrorBoundary(e => {
@@ -26,6 +26,6 @@ export function Tree({ lang, model, blockStates, onError }: TreePanelProps) {
})
return <div class="tree">
<FullNode {...{model, lang, blockStates}}/>
<FullNode {...{model, lang, version, blockStates}}/>
</div>
}