@@ -13,6 +13,7 @@ import { ProtectedRoute } from './components/ProtectedRoute'
1313import * as routes from './navigation/routes'
1414import { NotificationComponent } from './components/Notification'
1515import { Page } from './components/Page'
16+ import { ProtectedPage } from './components/ProtectedPage'
1617import { SelectVitalEvent } from './views/SelectVitalEvent/SelectVitalEvent'
1718import { SelectInformant } from './views/SelectInformant/SelectInformant'
1819import { ApplicationForm } from './views/RegisterForm/ApplicationForm'
@@ -29,9 +30,6 @@ import { ConfirmationScreen } from './views/ConfirmationScreen/ConfirmationScree
2930import { PrintCertificateAction } from './views/PrintCertificate/PrintCertificateAction'
3031import { ErrorBoundary } from './components/ErrorBoundary'
3132import { WorkQueue } from './views/WorkQueue/WorkQueue'
32- import { Unlock } from './views/Unlock/Unlock'
33- import { CreatePin } from './views/PIN/CreatePin'
34- import { SecureAccount } from './views/SecureAccount/SecureAccountView'
3533import { StyledErrorBoundary } from './components/StyledErrorBoundary'
3634
3735interface IAppProps {
@@ -58,94 +56,84 @@ export class App extends React.Component<IAppProps> {
5856 < SessionExpireConfirmation />
5957 < NotificationComponent >
6058 < Page >
61- < Switch >
62- < ProtectedRoute
63- exact
64- path = { routes . HOME }
65- component = { Home }
66- />
67- < ProtectedRoute
68- exact
69- path = { routes . SELECT_VITAL_EVENT }
70- component = { SelectVitalEvent }
71- />
72- < ProtectedRoute
73- exact
74- path = { routes . SELECT_INFORMANT }
75- component = { SelectInformant }
76- />
77- < ProtectedRoute
78- exact
79- path = { routes . DRAFT_BIRTH_PARENT_FORM }
80- component = { ApplicationForm }
81- />
82- < ProtectedRoute
83- exact
84- path = { routes . DRAFT_BIRTH_PARENT_FORM_TAB }
85- component = { ApplicationForm }
86- />
87- < ProtectedRoute
88- exact
89- path = { routes . DRAFT_DEATH_FORM }
90- component = { ApplicationForm }
91- />
92- < ProtectedRoute
93- exact
94- path = { routes . DRAFT_DEATH_FORM_TAB }
95- component = { ApplicationForm }
96- />
97- < ProtectedRoute
98- exact
99- path = { routes . REVIEW_EVENT_PARENT_FORM_TAB }
100- component = { ReviewForm }
101- />
102- < ProtectedRoute
103- exact
104- path = { routes . WORK_QUEUE }
105- component = { WorkQueue }
106- />
107- < ProtectedRoute
108- exact
109- path = { routes . WORK_QUEUE_TAB }
110- component = { WorkQueue }
111- />
112- < ProtectedRoute
113- path = { routes . CONFIRMATION_SCREEN }
114- component = { ConfirmationScreen }
115- />
116- < ProtectedRoute
117- path = { routes . SEARCH_RESULT }
118- component = { SearchResult }
119- />
120- < ProtectedRoute
121- path = { routes . MY_RECORDS }
122- component = { MyRecords }
123- />
124- < ProtectedRoute
125- path = { routes . MY_DRAFTS }
126- component = { MyDrafts }
127- />
128- < ProtectedRoute
129- path = { routes . REVIEW_DUPLICATES }
130- component = { ReviewDuplicates }
131- />
132- < ProtectedRoute
133- path = { routes . PRINT_CERTIFICATE }
134- component = { PrintCertificateAction }
135- />
136- < ProtectedRoute
137- path = { routes . CREATE_PIN }
138- component = { CreatePin }
139- />
140- < ProtectedRoute
141- path = { routes . SECURE_ACCOUNT }
142- component = { SecureAccount }
143- />
144- < ProtectedRoute
145- path = { routes . UNLOCK_SCREEN }
146- component = { Unlock }
147- />
148- </ Switch >
59+ < ProtectedPage >
60+ < Switch >
61+ < ProtectedRoute
62+ exact
63+ path = { routes . HOME }
64+ component = { Home }
65+ />
66+ < ProtectedRoute
67+ exact
68+ path = { routes . SELECT_VITAL_EVENT }
69+ component = { SelectVitalEvent }
70+ />
71+ < ProtectedRoute
72+ exact
73+ path = { routes . SELECT_INFORMANT }
74+ component = { SelectInformant }
75+ />
76+ < ProtectedRoute
77+ exact
78+ path = { routes . DRAFT_BIRTH_PARENT_FORM }
79+ component = { ApplicationForm }
80+ />
81+ < ProtectedRoute
82+ exact
83+ path = { routes . DRAFT_BIRTH_PARENT_FORM_TAB }
84+ component = { ApplicationForm }
85+ />
86+ < ProtectedRoute
87+ exact
88+ path = { routes . DRAFT_DEATH_FORM }
89+ component = { ApplicationForm }
90+ />
91+ < ProtectedRoute
92+ exact
93+ path = { routes . DRAFT_DEATH_FORM_TAB }
94+ component = { ApplicationForm }
95+ />
96+ < ProtectedRoute
97+ exact
98+ path = { routes . REVIEW_EVENT_PARENT_FORM_TAB }
99+ component = { ReviewForm }
100+ />
101+ < ProtectedRoute
102+ exact
103+ path = { routes . WORK_QUEUE }
104+ component = { WorkQueue }
105+ />
106+ < ProtectedRoute
107+ exact
108+ path = { routes . WORK_QUEUE_TAB }
109+ component = { WorkQueue }
110+ />
111+ < ProtectedRoute
112+ path = { routes . CONFIRMATION_SCREEN }
113+ component = { ConfirmationScreen }
114+ />
115+ < ProtectedRoute
116+ path = { routes . SEARCH_RESULT }
117+ component = { SearchResult }
118+ />
119+ < ProtectedRoute
120+ path = { routes . MY_RECORDS }
121+ component = { MyRecords }
122+ />
123+ < ProtectedRoute
124+ path = { routes . MY_DRAFTS }
125+ component = { MyDrafts }
126+ />
127+ < ProtectedRoute
128+ path = { routes . REVIEW_DUPLICATES }
129+ component = { ReviewDuplicates }
130+ />
131+ < ProtectedRoute
132+ path = { routes . PRINT_CERTIFICATE }
133+ component = { PrintCertificateAction }
134+ />
135+ </ Switch >
136+ </ ProtectedPage >
149137 </ Page >
150138 </ NotificationComponent >
151139 </ ScrollToTop >
0 commit comments