Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Bielefeld-CeBiTec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
2024 Competition
Bielefeld-CeBiTec
Commits
f1598cef
Commit
f1598cef
authored
7 months ago
by
Liliana Sanfilippo
Browse files
Options
Downloads
Patches
Plain Diff
ladebildschirm wieder da
parent
ce71b4c8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#401962
failed
7 months ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/App/App.tsx
+24
-1
24 additions, 1 deletion
src/App/App.tsx
with
24 additions
and
1 deletion
src/App/App.tsx
+
24
−
1
View file @
f1598cef
import
{
useEffect
}
from
"
react
"
;
import
{
useEffect
,
useState
}
from
"
react
"
;
import
"
./App.css
"
;
import
'
../App/Graph.css
'
;
import
'
../components/test.css
'
...
...
@@ -7,6 +7,7 @@ import "./App.scss";
import
'
beautiful-react-diagrams/styles.css
'
;
import
"
bootstrap/dist/css/bootstrap.min.css
"
;
import
"
./Graph.css
"
import
LoadingScreen
from
"
../components/LoadingScreen.tsx
"
;
import
{
Routes
,
Route
}
from
"
react-router-dom
"
;
import
{
Footer
}
from
"
../components/Footer.tsx
"
;
import
{
NotFound
}
from
"
../components/NotFound.tsx
"
;
...
...
@@ -19,6 +20,8 @@ import "./LoadingScreen.css";
const
App
=
()
=>
{
const
[
isLoading
,
setIsLoading
]
=
useState
(
true
);
const
pathMapping
=
getPathMapping
();
const
currentPath
=
location
.
pathname
...
...
@@ -33,7 +36,25 @@ const App = () => {
document
.
title
=
`
${
title
||
""
}
|
${
import
.
meta
.
env
.
VITE_TEAM_NAME
}
- iGEM
${
import
.
meta
.
env
.
VITE_TEAM_YEAR
}
`
;
},
[
title
]);
useEffect
(()
=>
{
const
timer
=
setTimeout
(()
=>
{
console
.
log
(
"
Hiding loading screen
"
);
setIsLoading
(
false
);
},
0
);
// Adjust the delay as needed, Update the loading state after 3 seconds
return
()
=>
{
console
.
log
(
"
Cleaning up timer
"
);
clearTimeout
(
timer
);
// Clear the timer on component unmount
};
},
[]);
return
(
<>
{
isLoading
?
(
<
LoadingScreen
/>
)
:
(
<>
{
/* Navigation */
}
<
Navbar
/>
...
...
@@ -97,6 +118,8 @@ const App = () => {
{
/* Footer */
}
<
Footer
/>
</>
)
}
</>
);
};
...
...
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