From 71c52373f81cace664047edd19d9d289f45a4dff Mon Sep 17 00:00:00 2001
From: Ricardo Cino <ricardo@cino.io>
Date: Thu, 7 Jul 2022 09:31:50 +0200
Subject: chore: Mobx & React-Router upgrade (#406)

Co-authored-by: Vijay A <vraravam@users.noreply.github.com>
---
 src/containers/layout/AppLayoutContainer.tsx | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

(limited to 'src/containers/layout/AppLayoutContainer.tsx')

diff --git a/src/containers/layout/AppLayoutContainer.tsx b/src/containers/layout/AppLayoutContainer.tsx
index 984ea8b68..a4857a426 100644
--- a/src/containers/layout/AppLayoutContainer.tsx
+++ b/src/containers/layout/AppLayoutContainer.tsx
@@ -1,19 +1,17 @@
-import { Children, Component, ReactElement, ReactNode } from 'react';
+import { Component, ReactElement } from 'react';
 import { inject, observer } from 'mobx-react';
 import { ThemeProvider } from 'react-jss';
+import { Outlet } from 'react-router-dom';
 
 import { StoresProps } from '../../@types/ferdium-components.types';
 import AppLayout from '../../components/layout/AppLayout';
 import Sidebar from '../../components/layout/Sidebar';
 import Services from '../../components/services/content/Services';
 import AppLoader from '../../components/ui/AppLoader';
-
 import WorkspaceDrawer from '../../features/workspaces/components/WorkspaceDrawer';
 import { workspaceStore } from '../../features/workspaces';
 
-interface AppLayoutContainerProps extends StoresProps {
-  children: ReactNode;
-}
+interface AppLayoutContainerProps extends StoresProps {}
 
 class AppLayoutContainer extends Component<AppLayoutContainerProps> {
   render(): ReactElement {
@@ -62,8 +60,6 @@ class AppLayoutContainer extends Component<AppLayoutContainerProps> {
 
     const { openSettings, closeSettings } = this.props.actions.ui;
 
-    const { children } = this.props;
-
     const isLoadingFeatures =
       features.featuresRequest.isExecuting &&
       !features.featuresRequest.wasExecuted;
@@ -162,7 +158,7 @@ class AppLayoutContainer extends Component<AppLayoutContainerProps> {
           retryRequiredRequests={retryRequiredRequests}
           areRequiredRequestsLoading={requests.areRequiredRequestsLoading}
         >
-          {Children.count(children) > 0 ? children : null}
+          <Outlet />
         </AppLayout>
       </ThemeProvider>
     );
-- 
cgit v1.2.3-70-g09d2

