mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
23 lines
472 B
Plaintext
23 lines
472 B
Plaintext
---
|
|
import { SchemaTools } from '../../schema_utils';
|
|
import Breadcrumb from './Breadcrumb.astro';
|
|
import Content from './Content.astro';
|
|
|
|
interface Props {
|
|
fileName: string;
|
|
def: string;
|
|
}
|
|
|
|
const { fileName, def } = Astro.props;
|
|
|
|
const schema = SchemaTools.readSchema(fileName);
|
|
const defs = SchemaTools.getDefs(schema);
|
|
|
|
const targetDef = defs.find(d => d.slug === def);
|
|
|
|
---
|
|
|
|
<Breadcrumb schema={targetDef!} />
|
|
<Content schema={targetDef!} level={0} isDef />
|
|
|