The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/client/views/admin/import/ImportRoute.js

36 lines
826 B

import React from 'react';
import { usePermission } from '../../../contexts/AuthorizationContext';
import NotAuthorizedPage from '../../../components/NotAuthorizedPage';
import ImportHistoryPage from './ImportHistoryPage';
import NewImportPage from './NewImportPage';
import PrepareImportPage from './PrepareImportPage';
import ImportProgressPage from './ImportProgressPage';
function ImportHistoryRoute({ page }) {
const canRunImport = usePermission('run-import');
if (!canRunImport) {
return <NotAuthorizedPage />;
}
if (page === 'history') {
return <ImportHistoryPage />;
}
if (page === 'new') {
return <NewImportPage />;
}
if (page === 'prepare') {
return <PrepareImportPage />;
}
if (page === 'progress') {
return <ImportProgressPage />;
}
return null;
}
export default ImportHistoryRoute;