Add basic export tab

This commit is contained in:
wpetit 2020-04-23 08:45:06 +02:00
parent 4412851d32
commit 1c117e302c
2 changed files with 21 additions and 1 deletions

View File

@ -0,0 +1,19 @@
import { FunctionalComponent, h, Fragment } from "preact";
import { Project } from "../../models/project";
import { useProjectEstimations, Estimation } from "../../hooks/use-project-estimations";
export interface ExportTabProps {
project: Project
}
const ExportTab: FunctionalComponent<ExportTabProps> = ({ project }) => {
return (
<div>
<label class="label is-size-4">Format JSON</label>
<pre>{ JSON.stringify(project, null, 2) }</pre>
<hr />
</div>
);
};
export default ExportTab;

View File

@ -9,6 +9,7 @@ import EditableText from "../../components/editable-text";
import Tabs from "../../components/tabs";
import EstimationTab from "./estimation-tab";
import ParamsTab from "./params-tab";
import ExportTab from "./export-tab";
export interface ProjectProps {
projectId: string
@ -50,7 +51,7 @@ const Project: FunctionalComponent<ProjectProps> = ({ projectId }) => {
{
label: 'Exporter',
icon: '↗️',
render: () => null
render: () => <ExportTab project={project} />
}
]}
/>