waveterm/frontend/app/view/helpview/helpview.tsx
2024-10-03 20:54:55 -07:00

30 lines
677 B
TypeScript

// Copyright 2024, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0
import { getApi } from "@/app/store/global";
import { useState } from "react";
import "./helpview.less";
class HelpViewModel implements ViewModel {
viewType: string;
constructor() {
this.viewType = "help";
}
}
function makeHelpViewModel() {
return new HelpViewModel();
}
function HelpView({}: { model: HelpViewModel }) {
const [url] = useState(() => getApi().getDocsiteUrl());
return (
<div className="help-view">
<webview className="docsite-webview" src={url} />
</div>
);
}
export { HelpView, HelpViewModel, makeHelpViewModel };