Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ce-deploy-ui
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ccce
dev
ce-deploy-ui
Commits
5976f8b6
Commit
5976f8b6
authored
3 months ago
by
Max Frederiksen
Committed by
Max Frederiksen
2 months ago
Browse files
Options
Downloads
Patches
Plain Diff
App.tsx, index.tsx
parent
4f7a98bc
No related branches found
No related tags found
2 merge requests
!612
Release 5.0.0
,
!590
CE-3429: Convert to typescript
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/App.tsx
+5
-17
5 additions, 17 deletions
src/App.tsx
src/index.tsx
+10
-6
10 additions, 6 deletions
src/index.tsx
with
15 additions
and
23 deletions
src/App.tsx
+
5
−
17
View file @
5976f8b6
...
@@ -25,10 +25,11 @@ import { CreateIOCAccessControl } from "./views/IOC/CreateIOCAccessControl";
...
@@ -25,10 +25,11 @@ import { CreateIOCAccessControl } from "./views/IOC/CreateIOCAccessControl";
import
{
UserDetailsAccessControl
}
from
"
./views/UserPage/UserDetailsAccessControl
"
;
import
{
UserDetailsAccessControl
}
from
"
./views/UserPage/UserDetailsAccessControl
"
;
import
{
ReduxProvider
}
from
"
./store/ReduxProvider
"
;
import
{
ReduxProvider
}
from
"
./store/ReduxProvider
"
;
import
env
from
"
./config/env
"
;
import
env
from
"
./config/env
"
;
import
{
GlobalAppBarContext
as
GlobalAppBarContextType
}
from
"
./types/common
"
;
// setting up the application (TAB)title
// setting up the application (TAB)title
function
App
()
{
function
App
()
{
const
{
setTitle
}
=
useContext
(
GlobalAppBarContext
);
const
{
setTitle
}
=
useContext
<
GlobalAppBarContextType
>
(
GlobalAppBarContext
);
useEffect
(()
=>
setTitle
(
applicationTitle
()),
[
setTitle
]);
useEffect
(()
=>
setTitle
(
applicationTitle
()),
[
setTitle
]);
return
(
return
(
...
@@ -37,7 +38,7 @@ function App() {
...
@@ -37,7 +38,7 @@ function App() {
<
BrowserRouter
>
<
BrowserRouter
>
<
SnackbarProvider
<
SnackbarProvider
preventDuplicate
preventDuplicate
maxSnack
=
"5"
maxSnack
=
{
5
}
>
>
<
StyledEngineProvider
injectFirst
>
<
StyledEngineProvider
injectFirst
>
<
ThemeProvider
theme
=
{
theme
}
>
<
ThemeProvider
theme
=
{
theme
}
>
...
@@ -49,75 +50,62 @@ function App() {
...
@@ -49,75 +50,62 @@ function App() {
<
Route
<
Route
path
=
"/"
path
=
"/"
element
=
{
<
Navigate
to
=
"/iocs"
/>
}
element
=
{
<
Navigate
to
=
"/iocs"
/>
}
exact
/>
/>
<
Route
<
Route
path
=
"/records"
path
=
"/records"
element
=
{
<
RecordListView
/>
}
element
=
{
<
RecordListView
/>
}
exact
/>
/>
<
Route
<
Route
path
=
"/records/:name"
path
=
"/records/:name"
element
=
{
<
RecordDetailsView
/>
}
element
=
{
<
RecordDetailsView
/>
}
exact
/>
/>
<
Route
<
Route
path
=
"/iocs/create"
path
=
"/iocs/create"
element
=
{
<
CreateIOCAccessControl
/>
}
element
=
{
<
CreateIOCAccessControl
/>
}
exact
/>
/>
<
Route
<
Route
path
=
"/iocs/:id"
path
=
"/iocs/:id"
element
=
{
<
IOCDetailsAccessControl
exact
/>
}
element
=
{
<
IOCDetailsAccessControl
/>
}
/>
/>
<
Route
<
Route
path
=
"/iocs"
path
=
"/iocs"
element
=
{
<
IOCListView
/>
}
element
=
{
<
IOCListView
/>
}
exact
/>
/>
<
Route
<
Route
path
=
"/jobs"
path
=
"/jobs"
element
=
{
<
JobLogAccessControl
/>
}
element
=
{
<
JobLogAccessControl
/>
}
exact
/>
/>
<
Route
<
Route
path
=
"/jobs/:id"
path
=
"/jobs/:id"
element
=
{
<
JobDetailsAccessControl
exact
/>
}
element
=
{
<
JobDetailsAccessControl
/>
}
/>
/>
<
Route
<
Route
path
=
"/hosts/:id"
path
=
"/hosts/:id"
element
=
{
<
HostDetailsAccessControl
/>
}
element
=
{
<
HostDetailsAccessControl
/>
}
exact
/>
/>
<
Route
<
Route
path
=
"/hosts"
path
=
"/hosts"
element
=
{
<
HostListView
/>
}
element
=
{
<
HostListView
/>
}
exact
/>
/>
<
Route
<
Route
path
=
"/help"
path
=
"/help"
element
=
{
<
HelpView
/>
}
element
=
{
<
HelpView
/>
}
exact
/>
/>
<
Route
<
Route
path
=
"/login"
path
=
"/login"
element
=
{
<
LoginView
/>
}
element
=
{
<
LoginView
/>
}
exact
/>
/>
<
Route
<
Route
path
=
"/error-test"
path
=
"/error-test"
element
=
{
<
TestErrorView
/>
}
element
=
{
<
TestErrorView
/>
}
exact
/>
/>
<
Route
<
Route
path
=
"/user/:userName"
path
=
"/user/:userName"
element
=
{
<
UserDetailsAccessControl
/>
}
element
=
{
<
UserDetailsAccessControl
/>
}
exact
/>
/>
<
Route
<
Route
path
=
"*"
path
=
"*"
element
=
{
<
NotFoundView
/>
}
element
=
{
<
NotFoundView
/>
}
exact
/>
/>
</
Routes
>
</
Routes
>
</
NavigationMenu
>
</
NavigationMenu
>
...
...
This diff is collapsed.
Click to expand it.
src/index.tsx
+
10
−
6
View file @
5976f8b6
...
@@ -7,10 +7,14 @@ import App from "./App";
...
@@ -7,10 +7,14 @@ import App from "./App";
LicenseInfo
.
setLicenseKey
(
import
.
meta
.
env
.
VITE_APP_MUI_PRO_LICENSE_KEY
);
LicenseInfo
.
setLicenseKey
(
import
.
meta
.
env
.
VITE_APP_MUI_PRO_LICENSE_KEY
);
const
container
=
document
.
getElementById
(
"
root
"
);
const
container
=
document
.
getElementById
(
"
root
"
);
const
root
=
createRoot
(
container
);
if
(
container
)
{
const
root
=
createRoot
(
container
);
root
.
render
(
root
.
render
(
<
StrictMode
>
<
StrictMode
>
<
App
/>
<
App
/>
</
StrictMode
>
</
StrictMode
>
);
);
}
else
{
throw
new
Error
(
"
No root element found
"
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment