From 08c58b0634690c179401d47c39c0d4252b9b8284 Mon Sep 17 00:00:00 2001 From: wangxuan Date: Fri, 11 Nov 2022 02:29:55 +0800 Subject: [PATCH] fix: deprecated syntax of lower substr (#3013) * fixed import error syntax * replace lower.substr with lower.substring * remove redundant parameter * fixed import syntax error * fixed import syntax error --- platform/core/src/extensions/ExtensionManager.js | 2 +- platform/viewer/src/App.tsx | 5 ++--- platform/viewer/src/index.js | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/platform/core/src/extensions/ExtensionManager.js b/platform/core/src/extensions/ExtensionManager.js index 48f7c996076..d7c93fe3294 100644 --- a/platform/core/src/extensions/ExtensionManager.js +++ b/platform/core/src/extensions/ExtensionManager.js @@ -365,5 +365,5 @@ export default class ExtensionManager { * @param {string} lower */ function _capitalizeFirstCharacter(lower) { - return lower.charAt(0).toUpperCase() + lower.substr(1); + return lower.charAt(0).toUpperCase() + lower.substring(1); } diff --git a/platform/viewer/src/App.tsx b/platform/viewer/src/App.tsx index 758984d1972..68e2ed7d8e2 100644 --- a/platform/viewer/src/App.tsx +++ b/platform/viewer/src/App.tsx @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; import i18n from '@ohif/i18n'; import { I18nextProvider } from 'react-i18next'; import { BrowserRouter } from 'react-router-dom'; -import Compose from './routes/Mode/Compose.tsx'; +import Compose from './routes/Mode/Compose'; import { DialogProvider, @@ -22,7 +22,7 @@ import { import { AppConfigProvider } from '@state'; import createRoutes from './routes'; import appInit from './appInit.js'; -import OpenIdConnectRoutes from './utils/OpenIdConnectRoutes.tsx'; +import OpenIdConnectRoutes from './utils/OpenIdConnectRoutes'; let commandsManager, extensionManager, servicesManager, hotkeysManager; @@ -60,7 +60,6 @@ function App({ config, defaultExtensions, defaultModes }) { servicesManager, commandsManager, hotkeysManager, - commandsManager, routerBasename, }); const { diff --git a/platform/viewer/src/index.js b/platform/viewer/src/index.js index 6adab470324..80cc7eb8d4a 100644 --- a/platform/viewer/src/index.js +++ b/platform/viewer/src/index.js @@ -2,7 +2,7 @@ * Entry point for development and production PWA builds. */ import 'regenerator-runtime/runtime'; -import App from './App.tsx'; +import App from './App'; import React from 'react'; import ReactDOM from 'react-dom';