Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SMU-GDMU-CHINA
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
SMU-GDMU-CHINA
Commits
83189a25
Commit
83189a25
authored
6 months ago
by
Xingan Zhao
Browse files
Options
Downloads
Patches
Plain Diff
fix
parent
cea3e82c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#434409
passed
6 months ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/containers/App/App.tsx
+0
-120
0 additions, 120 deletions
src/containers/App/App.tsx
with
0 additions
and
120 deletions
src/containers/App/App.tsx
+
0
−
120
View file @
83189a25
// import "./App.css";
// import "bootstrap/dist/css/bootstrap.min.css";
// import 'bootstrap/dist/js/bootstrap.bundle.min.js'; // 引入 Bootstrap JavaScript
// import { Route, Routes, useLocation } from "react-router-dom";
// import { Footer, Header, Navbar, NotFound, Loading } from "../../components";
// import { getPathMapping, stringToSlug } from "../../utils";
// import { useEffect, useState } from "react";
// import axios from "axios";
// // import path from "path";
// const App = () => {
// const pathMapping = getPathMapping();
// const location = useLocation();
// const currentPath =
// location.pathname
// .split(`${stringToSlug(import.meta.env.VITE_TEAM_NAME)}`)
// .pop() || "/";
// // Set Page Title
// const title =
// currentPath in pathMapping ? pathMapping[currentPath].title : "Not Found";
// useEffect(() => {
// // document.title = `${title || ""} | ${import.meta.env.VITE_TEAM_NAME} - iGEM ${import.meta.env.VITE_TEAM_YEAR}`;
// document.title = `${title}`;
// }, [title]);
// // 加载页面
// const [loading, setLoading] = useState(true);
// // 这是定时两秒动画
// // useEffect(() => {
// // // 模拟加载过程
// // console.log(`https://${import.meta.env.VITE_TEAM_YEAR}.igem.wiki/${import.meta.env.VITE_TEAM_NAME}${location.pathname}`);
// // setLoading(true);
// // const timer = setTimeout(() => {
// // setLoading(false);
// // }, 2000); // 2秒后隐藏加载页面
// // return () => clearTimeout(timer);
// // }, [location.pathname]); // 监听路由变化
// // // 这是加载完成后0.5秒结束播放动画
// useEffect(() => {
// // 发起网络请求
// console.log(`https://${import.meta.env.VITE_TEAM_YEAR}.igem.wiki/${import.meta.env.VITE_TEAM_NAME}${location.pathname}`);
// axios.get(`https://${import.meta.env.VITE_TEAM_YEAR}.igem.wiki/${import.meta.env.VITE_TEAM_NAME}${location.pathname}`)
// .then(response => {
// // 处理响应数据
// console.log(response.data);
// })
// .catch(error => {
// console.error('Error fetching data:', error);
// })
// .finally(() => {
// setLoading(true);
// // 请求完成后隐藏加载动画
// setTimeout(() => {
// setLoading(false);
// },500);
// });
// }, [location.pathname]);
// return (
// <>
// {loading ? (
// <Loading />
// ) : (
// <>
// {/* Navigation */}
// <Navbar />
// {/* Header and PageContent */}
// <Routes>
// {Object.entries(pathMapping).map(
// ([path, { component: Component }]) => (
// <Route
// key={path}
// path={path}
// element={
// <>
// <div>
// <Component />
// </div>
// </>
// }
// />
// ),
// )}
// <Route
// path="*"
// element={
// <>
// <Header
// title="Not Found"
// lead="The requested URL was not found on this server."
// />
// <NotFound />
// </>
// }
// />
// </Routes>
// {/* Footer */}
// <Footer />
// </>
// )}
// </>
// );
// };
// export default App;
import
"
./App.css
"
;
import
"
bootstrap/dist/css/bootstrap.min.css
"
;
import
'
bootstrap/dist/js/bootstrap.bundle.min.js
'
;
// 引入 Bootstrap JavaScript
...
...
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