@@ -25,7 +25,11 @@ import PlanPageHeader from './navigation/header/Header';
2525import { PlanBody } from './PlanBody' ;
2626import { formatModuleDate } from './utils/formatModuleDate' ;
2727
28- const PlanPage = ( { plan } : { plan : GetPlansByPidApiResponse | undefined } ) => {
28+ const PlanPageContent = ( {
29+ plan,
30+ } : {
31+ plan : GetPlansByPidApiResponse | undefined ;
32+ } ) => {
2933 const { t } = useTranslation ( ) ;
3034 const { activeTab, setActiveTab } = usePlanContext ( ) ;
3135 const [ searchParams , setSearchParams ] = useSearchParams ( ) ;
@@ -58,17 +62,10 @@ const PlanPage = ({ plan }: { plan: GetPlansByPidApiResponse | undefined }) => {
5862 } , [ ] ) ;
5963
6064 return (
61- < Page
62- title = { t ( '__PLAN_PAGE_TITLE' ) }
63- className = "plan-page"
64- route = "plan"
65- isMinimal
66- excludeMarginTop
67- excludeMarginBottom
68- >
65+ < >
6966 < PlanPageHeader />
7067 < PlanBody />
71- </ Page >
68+ </ >
7269 ) ;
7370} ;
7471
@@ -95,6 +92,7 @@ const Plan = () => {
9592 const navigate = useNavigate ( ) ;
9693 const location = useLocation ( ) ;
9794 const { planId } = useParams ( ) ;
95+ const { t } = useTranslation ( ) ;
9896 const { isError, data : plan } = useGetPlansByPidQuery (
9997 {
10098 pid : Number ( planId ) . toString ( ) ,
@@ -145,11 +143,20 @@ const Plan = () => {
145143 }
146144
147145 return (
148- < FormProvider initialValues = { initialValues } >
149- < PlanProvider >
150- < PlanPage plan = { plan } />
151- </ PlanProvider >
152- </ FormProvider >
146+ < Page
147+ title = { t ( '__PLAN_PAGE_TITLE' ) }
148+ className = "plan-page"
149+ route = "plan"
150+ isMinimal
151+ excludeMarginTop
152+ excludeMarginBottom
153+ >
154+ < FormProvider initialValues = { initialValues } >
155+ < PlanProvider >
156+ < PlanPageContent plan = { plan } />
157+ </ PlanProvider >
158+ </ FormProvider >
159+ </ Page >
153160 ) ;
154161} ;
155162
0 commit comments