31 lines
672 B
TypeScript
31 lines
672 B
TypeScript
import { Component } from 'solid-js';
|
|
import WptIcon from '../../icons/location-pin-svgrepo-com.svg?component-solid';
|
|
import { peekCachedSignal } from '../../workers/cached-signals';
|
|
import Tree from '../tree';
|
|
|
|
interface Props {
|
|
wptId: string;
|
|
}
|
|
|
|
const WptViewer: Component<Props> = ({ wptId }) => {
|
|
const wpt = peekCachedSignal({ id: wptId, method: 'getWpt' });
|
|
console.log({ caller: 'WptViewer', wptId, wpt: wpt() });
|
|
const title = () => {
|
|
return wpt().name;
|
|
};
|
|
|
|
return (
|
|
<Tree
|
|
title={
|
|
<>
|
|
<WptIcon /> {title()}
|
|
</>
|
|
}
|
|
content={undefined}
|
|
subTree={undefined}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default WptViewer;
|