diff --git a/src/pages/DAOController.tsx b/src/pages/DAOController.tsx
index bcf37ebe6c..50e41d5421 100644
--- a/src/pages/DAOController.tsx
+++ b/src/pages/DAOController.tsx
@@ -2,6 +2,7 @@ import { Button, Center, Text, VStack, ChakraProvider, extendTheme } from '@chak
import { theme } from '@decent-org/fractal-ui';
import { useMemo } from 'react';
import { useTranslation } from 'react-i18next';
+import { Outlet } from 'react-router-dom';
import useDAOController from '../hooks/DAO/useDAOController';
import useDAOMetadata from '../hooks/DAO/useDAOMetadata';
import { useFractal } from '../providers/App/AppProvider';
@@ -31,7 +32,7 @@ function InvalidSafe() {
);
}
-export default function DAOController({ children }: { children: React.ReactNode }) {
+export default function DAOController() {
const { node } = useFractal();
const { nodeLoading, errorLoading } = useDAOController();
const daoMetadata = useDAOMetadata();
@@ -62,9 +63,13 @@ export default function DAOController({ children }: { children: React.ReactNode
let display;
if (import.meta.env.VITE_APP_TESTING_ENVIRONMENT) {
- display = {children};
+ display = (
+
+
+
+ );
} else if (nodeLoading || validSafe || !errorLoading) {
- display = <>{children}>;
+ display = ;
} else {
display = ;
}
diff --git a/src/router.tsx b/src/router.tsx
index 3897d8b602..79c0f4dd29 100644
--- a/src/router.tsx
+++ b/src/router.tsx
@@ -25,9 +25,7 @@ export const router = createBrowserRouter([
// within underlying modals. Otherwise - trying to invoke routing-related hooks would lead to crash.
// Not the best place to have this provider here but also more reasonalbe than putting that into
-
-
-
+
),
children: [
@@ -40,59 +38,65 @@ export const router = createBrowserRouter([
element: ,
},
{
- path: 'home',
- element: ,
- },
- {
- path: 'edit/governance',
- element: ,
- },
- {
- path: 'hierarchy',
- element: ,
- },
- {
- path: 'new',
- element: ,
- },
- {
- path: 'proposal-templates',
+ path: '/',
+ element: ,
children: [
{
- index: true,
- element: ,
+ path: 'home',
+ element: ,
+ },
+ {
+ path: 'edit/governance',
+ element: ,
+ },
+ {
+ path: 'hierarchy',
+ element: ,
},
{
path: 'new',
- element: ,
+ element: ,
},
- ],
- },
- {
- path: 'proposals',
- children: [
{
- index: true,
- element: ,
+ path: 'proposal-templates',
+ children: [
+ {
+ index: true,
+ element: ,
+ },
+ {
+ path: 'new',
+ element: ,
+ },
+ ],
},
{
- path: ':proposalId',
- element: ,
+ path: 'proposals',
+ children: [
+ {
+ index: true,
+ element: ,
+ },
+ {
+ path: ':proposalId',
+ element: ,
+ },
+ {
+ path: 'new',
+ element: ,
+ },
+ ],
},
{
- path: 'new',
- element: ,
+ path: 'settings',
+ element: ,
+ },
+ {
+ path: 'treasury',
+ element: ,
},
],
},
- {
- path: 'settings',
- element: ,
- },
- {
- path: 'treasury',
- element: ,
- },
{
// this exists to keep old links working
// /daos/0x0123/* will redirect to /home?dao=0x0123