Leo преди 2 години
родител
ревизия
087a383960
променени са 3 файла, в които са добавени 5 реда и са изтрити 4 реда
  1. 3 2
      src/App.jsx
  2. 1 1
      src/module/datasource/component/DatasourceLog.jsx
  3. 1 1
      src/module/datasource/page/DatasourceView.jsx

+ 3 - 2
src/App.jsx

@@ -44,10 +44,11 @@ export default function Sidebar() {
     return {
       path: item.path,
       exact: item?.exact,
-      component: <item.component />,
+      component: item.component,
     }
   })
   const list = routesInfo.concat(...childrenList)
+  console.log('routes', list)
 
   return (
     <SidebarDiv>
@@ -64,7 +65,7 @@ export default function Sidebar() {
                   key={index}
                   path={route.path}
                   exact={route?.exact}
-                  element={route.component}
+                  element={<route.component />}
                 />
               ))}
             </Routes>

+ 1 - 1
src/module/datasource/component/DatasourceLog.jsx

@@ -14,7 +14,7 @@ const DatasourceLog = () => {
 
   const changeTask = () => {}
   const checkLog = id => {
-    navigate('/log', { state: { id } })
+    navigate('/datasource/log-watcher', { state: { id } })
   }
   const columns = [
     {

+ 1 - 1
src/module/datasource/page/DatasourceView.jsx

@@ -28,7 +28,7 @@ export default function DatasourceView() {
         return <DatasourceAdd updateDataSource={updateDataSource} />
       case '2':
         return (
-          <Link to="/sync">
+          <Link to="/datasource/sync-task">
             <Button type="primary">添加同步任务</Button>
           </Link>
         )