Skip to content

Commit

Permalink
chore: fixing sonar issues HAUKI-672
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkojamG committed Dec 11, 2024
1 parent 9b04a14 commit 8fcfa88
Showing 1 changed file with 142 additions and 164 deletions.
306 changes: 142 additions & 164 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,210 +186,188 @@ const App = (): JSX.Element => {
<Route
id="resource-route"
path="/resource/:id"
element={() => {
return (
id && (
<PermissionResolver id={id}>
<NavigationAndFooterWrapper>
<Main id="main">
<SelectedDatePeriodsProvider>
<ResourcePage
mainResourceId={id}
childId={childId}
targetResourcesString={targetResourcesStr}
/>
</SelectedDatePeriodsProvider>
</Main>
</NavigationAndFooterWrapper>
</PermissionResolver>
)
);
}}
element={
id && (
<PermissionResolver id={id}>
<NavigationAndFooterWrapper>
<Main id="main">
<SelectedDatePeriodsProvider>
<ResourcePage
mainResourceId={id}
childId={childId}
targetResourcesString={targetResourcesStr}
/>
</SelectedDatePeriodsProvider>
</Main>
</NavigationAndFooterWrapper>
</PermissionResolver>
)
}
/>
<Route
id="resource-route-child"
path="/resource/:id/child/:childId"
element={() => {
return (
id && (
<PermissionResolver id={id}>
<NavigationAndFooterWrapper>
<Main id="main">
<SelectedDatePeriodsProvider>
<ResourcePage
mainResourceId={id}
childId={childId}
targetResourcesString={targetResourcesStr}
/>
</SelectedDatePeriodsProvider>
</Main>
</NavigationAndFooterWrapper>
</PermissionResolver>
)
);
}}
element={
id && (
<PermissionResolver id={id}>
<NavigationAndFooterWrapper>
<Main id="main">
<SelectedDatePeriodsProvider>
<ResourcePage
mainResourceId={id}
childId={childId}
targetResourcesString={targetResourcesStr}
/>
</SelectedDatePeriodsProvider>
</Main>
</NavigationAndFooterWrapper>
</PermissionResolver>
)
}
/>
<Route
id="resource-batch-update-route"
path="/resource/:id/batch"
element={() => {
return (
id && (
<PermissionResolver id={id}>
<NavigationAndFooterWrapper>
<Main id="main">
<SelectedDatePeriodsProvider>
<ResourceBatchUpdatePage
mainResourceId={id}
targetResourcesString={targetResourcesStr}
/>
</SelectedDatePeriodsProvider>
</Main>
</NavigationAndFooterWrapper>
</PermissionResolver>
)
);
}}
element={
id && (
<PermissionResolver id={id}>
<NavigationAndFooterWrapper>
<Main id="main">
<SelectedDatePeriodsProvider>
<ResourceBatchUpdatePage
mainResourceId={id}
targetResourcesString={targetResourcesStr}
/>
</SelectedDatePeriodsProvider>
</Main>
</NavigationAndFooterWrapper>
</PermissionResolver>
)
}
/>
<Route
id="create-new-opening-period-route-child"
path="/resource/:parentId/child/:id/period/new/"
element={() => {
return (
id && (
<PermissionResolver id={id}>
<HaukiHeader />
<Main id="main">
<AddNormalOpeningHoursPage resourceId={id} />
</Main>
</PermissionResolver>
)
);
}}
element={
id && (
<PermissionResolver id={id}>
<HaukiHeader />
<Main id="main">
<AddNormalOpeningHoursPage resourceId={id} />
</Main>
</PermissionResolver>
)
}
/>
<Route
id="create-new-opening-period-route"
path="/resource/:id/period/new"
element={() => {
return (
id && (
<PermissionResolver id={id}>
<HaukiHeader />
<Main id="main">
<AddNormalOpeningHoursPage resourceId={id} />
</Main>
</PermissionResolver>
)
);
}}
element={
id && (
<PermissionResolver id={id}>
<HaukiHeader />
<Main id="main">
<AddNormalOpeningHoursPage resourceId={id} />
</Main>
</PermissionResolver>
)
}
/>
<Route
id="edit-opening-period-route-child"
path="/resource/:parentId/child/:id/period/:datePeriodId"
element={() => {
return (
id &&
datePeriodId && (
<PermissionResolver id={id}>
<HaukiHeader />
<Main id="main">
<EditNormalOpeningHoursPage
resourceId={id}
datePeriodId={datePeriodId}
/>
</Main>
</PermissionResolver>
)
);
}}
element={
id &&
datePeriodId && (
<PermissionResolver id={id}>
<HaukiHeader />
<Main id="main">
<EditNormalOpeningHoursPage
resourceId={id}
datePeriodId={datePeriodId}
/>
</Main>
</PermissionResolver>
)
}
/>
<Route
id="edit-opening-period-route"
path="/resource/:id/period/:datePeriodId"
element={() => {
return (
id &&
datePeriodId && (
<PermissionResolver id={id}>
<HaukiHeader />
<Main id="main">
<EditNormalOpeningHoursPage
resourceId={id}
datePeriodId={datePeriodId}
/>
</Main>
</PermissionResolver>
)
);
}}
element={
id &&
datePeriodId && (
<PermissionResolver id={id}>
<HaukiHeader />
<Main id="main">
<EditNormalOpeningHoursPage
resourceId={id}
datePeriodId={datePeriodId}
/>
</Main>
</PermissionResolver>
)
}
/>
<Route
id="edit-holidays-route-child"
path="/resource/:parentId/child/:id/holidays"
element={() => {
return (
id && (
<PermissionResolver id={id}>
<HaukiHeader />
<Main id="main">
<EditHolidaysPage resourceId={id} />
</Main>
</PermissionResolver>
)
);
}}
element={
id && (
<PermissionResolver id={id}>
<HaukiHeader />
<Main id="main">
<EditHolidaysPage resourceId={id} />
</Main>
</PermissionResolver>
)
}
/>
<Route
id="edit-holidays-route"
path="/resource/:id/holidays"
element={() => {
return (
id && (
<PermissionResolver id={id}>
<HaukiHeader />
<Main id="main">
<EditHolidaysPage resourceId={id} />
</Main>
</PermissionResolver>
)
);
}}
element={
id && (
<PermissionResolver id={id}>
<HaukiHeader />
<Main id="main">
<EditHolidaysPage resourceId={id} />
</Main>
</PermissionResolver>
)
}
/>
<Route
id="add-exception-route-child"
path="/resource/:parentId/child/:id/exception/new/"
element={() => {
return (
id && (
<PermissionResolver id={id}>
<HaukiHeader />
<Main id="main">
<AddExceptionOpeningHoursPage resourceId={id} />
</Main>
</PermissionResolver>
)
);
}}
element={
id && (
<PermissionResolver id={id}>
<HaukiHeader />
<Main id="main">
<AddExceptionOpeningHoursPage resourceId={id} />
</Main>
</PermissionResolver>
)
}
/>
<Route
id="add-exception-route"
path="/resource/:parentId/child/:id/exception/:datePeriodId"
element={() => {
return (
id &&
datePeriodId && (
<PermissionResolver id={id}>
<HaukiHeader />
<Main id="main">
<EditExceptionOpeningHoursPage
datePeriodId={datePeriodId}
resourceId={id}
/>
</Main>
</PermissionResolver>
)
);
}}
element={
id &&
datePeriodId && (
<PermissionResolver id={id}>
<HaukiHeader />
<Main id="main">
<EditExceptionOpeningHoursPage
datePeriodId={datePeriodId}
resourceId={id}
/>
</Main>
</PermissionResolver>
)
}
/>
</Routes>
</Router>
Expand Down

0 comments on commit 8fcfa88

Please sign in to comment.