ente/src/components/ExportModal.tsx
2021-07-06 17:10:02 +05:30

30 lines
807 B
TypeScript

import React, { useState } from 'react';
import ExportFinished from './ExportFinished';
import ExportInit from './ExportInit';
import ExportInProgress from './ExportInProgress';
enum ExportState {
INIT,
INPROGRESS,
FINISHED
}
export default function ExportModal(props) {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const [exportState, setExportState] = useState(ExportState.FINISHED);
switch (exportState) {
case ExportState.INIT:
return (
<ExportInit {...props} />
);
case ExportState.INPROGRESS:
return (
<ExportInProgress {...props} />
);
case ExportState.FINISHED:
return (
<ExportFinished {...props} />
);
}
}