diff --git a/src/App.tsx b/src/App.tsx index 6570971..445f553 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -21,9 +21,11 @@ import { UserRoleEnum } from 'enums'; import { useRootStore } from 'hooks/useRootStore'; const App = () => { - const { uiStore } = useRootStore(); + const { + uiStore: { history }, + } = useRootStore(); return ( - + diff --git a/src/components/PrivateRoute/PrivateRoute.tsx b/src/components/PrivateRoute/PrivateRoute.tsx index 201f336..b94d6a4 100644 --- a/src/components/PrivateRoute/PrivateRoute.tsx +++ b/src/components/PrivateRoute/PrivateRoute.tsx @@ -32,7 +32,7 @@ const PrivateRoute: React.FC = ({ component: Component, titl ) : ( - + ) } /> diff --git a/src/stores/UIStore.ts b/src/stores/UIStore.ts index 948513d..4d7a21b 100644 --- a/src/stores/UIStore.ts +++ b/src/stores/UIStore.ts @@ -15,7 +15,7 @@ export default class UIStore { makeAutoObservable(this); this.history.listen(({ pathname }) => { - console.log('path chaged'); + console.log(`[history]: pathname changed to ${pathname}`); this.location = pathname; });