mirror of
https://github.com/exogen/t2-mapper.git
synced 2026-03-04 04:50:33 +00:00
move non-Next components out of app folder
This commit is contained in:
parent
fdd27b26d7
commit
beade00727
14 changed files with 41 additions and 44 deletions
21
src/components/renderObject.tsx
Normal file
21
src/components/renderObject.tsx
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import { ConsoleObject } from "../mission";
|
||||
import { TerrainBlock } from "./TerrainBlock";
|
||||
import { WaterBlock } from "./WaterBlock";
|
||||
import { SimGroup } from "./SimGroup";
|
||||
import { InteriorInstance } from "./InteriorInstance";
|
||||
import { Sky } from "./Sky";
|
||||
import { Sun } from "./Sun";
|
||||
|
||||
const componentMap = {
|
||||
SimGroup,
|
||||
TerrainBlock,
|
||||
WaterBlock,
|
||||
InteriorInstance,
|
||||
Sky,
|
||||
Sun,
|
||||
};
|
||||
|
||||
export function renderObject(object: ConsoleObject, key: string | number) {
|
||||
const Component = componentMap[object.className];
|
||||
return Component ? <Component key={key} object={object} /> : null;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue