bitburner-src/src/Gang/ui/TaskDescription.tsx
2021-08-15 12:09:44 -04:00

18 lines
590 B
TypeScript

/**
* React Component for left side of the gang member accordion, contains the
* description of the task that member is currently doing.
*/
import React from "react";
import { GangMemberTasks } from "../GangMemberTasks";
import { GangMember } from "../GangMember";
interface IProps {
member: GangMember;
}
export function TaskDescription(props: IProps): React.ReactElement {
const task = GangMemberTasks[props.member.task];
const desc = task ? task.desc: GangMemberTasks["Unassigned"].desc;
return (<p className="inline" dangerouslySetInnerHTML={{__html: desc}} />);
}