Skip to content

Commit e60a9bb

Browse files
committed
revert app file
1 parent 4c408c3 commit e60a9bb

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

src/App.tsx

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import {
1717
ToastBody,
1818
ToastBody3 as UpdateToast,
1919
ErrorBoundary,
20-
importComponentFromFELibrary,
2120
} from './components/common'
2221
import { showError, BreadcrumbStore, Reload, DevtronProgressing } from '@devtron-labs/devtron-fe-common-lib'
2322
import * as serviceWorker from './serviceWorker'
@@ -26,11 +25,7 @@ import { validateToken } from './services/service'
2625

2726
const NavigationRoutes = lazy(() => import('./components/common/navigation/NavigationRoutes'))
2827
const Login = lazy(() => import('./components/login/Login'))
29-
const GenericDirectApprovalModal = importComponentFromFELibrary('GenericDirectApprovalModal')
30-
export enum APPROVAL_MODAL_TYPE {
31-
CONFIG = 'CONFIG',
32-
IMAGE = 'IMAGE',
33-
}
28+
3429
toast.configure({
3530
autoClose: 3000,
3631
hideProgressBar: true,
@@ -92,9 +87,6 @@ export default function App() {
9287
useEffect(() => {
9388
async function validation() {
9489
try {
95-
if (location.pathname.includes('approval')) {
96-
return
97-
}
9890
await validateToken()
9991
defaultRedirection()
10092
} catch (err: any) {
@@ -114,7 +106,7 @@ export default function App() {
114106
}
115107
}
116108
// If not K8S_CLIENT then validateToken otherwise directly redirect
117-
if (!window._env_.K8S_CLIENT) {
109+
if (!window._env_.K8S_CLIENT) {
118110
validation()
119111
} else {
120112
setValidating(false)
@@ -215,7 +207,7 @@ export default function App() {
215207
<Suspense fallback={null}>
216208
{validating ? (
217209
<div className="full-height-width">
218-
<DevtronProgressing parentClasses="h-100 flex bcn-0" classes="icon-dim-80" />
210+
<DevtronProgressing parentClasses="h-100 flex bcn-0" classes="icon-dim-80"/>
219211
</div>
220212
) : (
221213
<>
@@ -228,7 +220,6 @@ export default function App() {
228220
<BreadcrumbStore>
229221
<Switch>
230222
{!window._env_.K8S_CLIENT && <Route path={`/login`} component={Login} />}
231-
<Route path={`/approval`} render={() => GenericDirectApprovalModal && <GenericDirectApprovalModal approvalType= {APPROVAL_MODAL_TYPE.IMAGE }/>} />
232223
<Route path="/" render={() => <NavigationRoutes />} />
233224
<Redirect
234225
to={window._env_.K8S_CLIENT ? '/' : `${URLS.LOGIN_SSO}${location.search}`}

0 commit comments

Comments
 (0)