@@ -19,6 +19,8 @@ import {
19
19
RouteObject ,
20
20
} from "react-router-dom"
21
21
import { RequireAuth } from "../components/RequireAuth/RequireAuth"
22
+ import { MockUser } from "./entities"
23
+ import { AuthenticatedProviders } from "AppRouter"
22
24
23
25
export const history = createMemoryHistory ( )
24
26
@@ -62,9 +64,14 @@ export function renderWithAuth(
62
64
element : < RequireAuth /> ,
63
65
children : [
64
66
{
65
- element : < DashboardLayout /> ,
66
- children : [ { path, element } , ...extraRoutes ] ,
67
- } ,
67
+ element : < AuthenticatedProviders /> ,
68
+ children : [
69
+ {
70
+ element : < DashboardLayout /> ,
71
+ children : [ { path, element } , ...extraRoutes ] ,
72
+ } ,
73
+ ] ,
74
+ }
68
75
] ,
69
76
} ,
70
77
...nonAuthenticatedRoutes ,
@@ -101,11 +108,16 @@ export function renderWithTemplateSettingsLayout(
101
108
element : < RequireAuth /> ,
102
109
children : [
103
110
{
104
- element : < DashboardLayout /> ,
111
+ element : < AuthenticatedProviders /> ,
105
112
children : [
106
113
{
107
- element : < TemplateSettingsLayout /> ,
108
- children : [ { path, element } , ...extraRoutes ] ,
114
+ element : < DashboardLayout /> ,
115
+ children : [
116
+ {
117
+ element : < TemplateSettingsLayout /> ,
118
+ children : [ { path, element } , ...extraRoutes ] ,
119
+ } ,
120
+ ] ,
109
121
} ,
110
122
] ,
111
123
} ,
@@ -145,11 +157,16 @@ export function renderWithWorkspaceSettingsLayout(
145
157
element : < RequireAuth /> ,
146
158
children : [
147
159
{
148
- element : < DashboardLayout /> ,
160
+ element : < AuthenticatedProviders /> ,
149
161
children : [
150
162
{
151
- element : < WorkspaceSettingsLayout /> ,
152
- children : [ { path, element } , ...extraRoutes ] ,
163
+ element : < DashboardLayout /> ,
164
+ children : [
165
+ {
166
+ element : < WorkspaceSettingsLayout /> ,
167
+ children : [ { path, element } , ...extraRoutes ] ,
168
+ } ,
169
+ ] ,
153
170
} ,
154
171
] ,
155
172
} ,
0 commit comments