Expand tagger manual entry and add link to tagger interface (#947)

This commit is contained in:
InfiniteTF
2020-11-20 02:07:36 +01:00
committed by GitHub
parent e62e74bff4
commit 21806decca
3 changed files with 84 additions and 43 deletions

View File

@@ -19,9 +19,14 @@ import { MarkdownPage } from "../Shared/MarkdownPage";
interface IManualProps {
show: boolean;
onClose: () => void;
defaultActiveTab?: string;
}
export const Manual: React.FC<IManualProps> = ({ show, onClose }) => {
export const Manual: React.FC<IManualProps> = ({
show,
onClose,
defaultActiveTab,
}) => {
const content = [
{
key: "Introduction.md",
@@ -98,7 +103,9 @@ export const Manual: React.FC<IManualProps> = ({ show, onClose }) => {
},
];
const [activeTab, setActiveTab] = useState(content[0].key);
const [activeTab, setActiveTab] = useState(
defaultActiveTab ?? content[0].key
);
// links to other manual pages are specified as "/help/page.md"
// intercept clicks to these pages and set the tab accordingly