Skip to content

Commit

Permalink
fix examine panel (#30)
Browse files Browse the repository at this point in the history
js -> tsx
  • Loading branch information
larentoun authored Feb 8, 2024
1 parent b745a54 commit 37e1a96
Showing 1 changed file with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
import { BooleanLike } from '../../common/react';
import { useBackend } from '../backend';
import { ByondUi, Section, Stack } from '../components';
import { Section, Stack } from '../components';
import { Window } from '../layouts';
import { CharacterPreview } from './common/CharacterPreview';

export const ExaminePanel = (props, context) => {
const { act, data } = useBackend(context);
type Data = {
character_name: string;
obscured: BooleanLike;
assigned_map: string;
flavor_text: string;
};

export const ExaminePanel = (props) => {
const { act, data } = useBackend<Data>();
const { character_name, obscured, assigned_map, flavor_text } = data;
return (
<Window title="Examine Panel" width={900} height={670} theme="admin">
Expand All @@ -12,15 +21,7 @@ export const ExaminePanel = (props, context) => {
<Stack.Item width="30%">
<Section fill title="Character Preview">
{!obscured && (
<ByondUi
height="100%"
width="100%"
className="ExaminePanel__map"
params={{
id: assigned_map,
type: 'map',
}}
/>
<CharacterPreview id={assigned_map} height="100%" />
)}
</Section>
</Stack.Item>
Expand Down

0 comments on commit 37e1a96

Please sign in to comment.