From 6ffe6709075cdfbb63aa24d2fa7be3d60c343e1c Mon Sep 17 00:00:00 2001 From: Dallas <71103219+LeleDallas@users.noreply.github.com> Date: Thu, 4 May 2023 18:42:45 +0200 Subject: [PATCH] feat: update route --- src/App.tsx | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index b412249..49ee921 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -13,7 +13,7 @@ import { connect } from 'react-redux'; import { useEffect, useState } from 'react'; import Service from "./Service/index.tsx"; import Login from "./Login/Login.tsx"; - +import DashboardRoutes from "./Consumer/DashboardRoutes.tsx"; interface MapProps { user: any; @@ -21,7 +21,7 @@ interface MapProps { type: string } -const App = () => { +const App = ({ logged }: { logged?: boolean }) => { const [show, setShow] = useState(false); useEffect(() => { @@ -34,17 +34,23 @@ const App = () => { return (
- -
); }; @@ -57,4 +63,6 @@ const mapStateToProps = (state: MapProps) => { const connector = connect(mapStateToProps); -export default connector(App); +const ReturnApp = connector(App) + +export default ReturnApp;