forgeplus-react/src/glcc/freeProject/index.jsx

66 lines
2.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import React from 'react';
import { Spin } from 'antd';
import { Route, Switch } from "react-router-dom";
import banner from "../img/studentProject2.png";
import './index.scss';
import Loadable from "react-loadable";
import Loading from "../../Loading";
import { Link } from 'react-router-dom';
import { useEffect } from 'react';
// 项目列表页面
const ProjectList = Loadable({
loader: () => import("./projectList"),
loading: Loading,
});
// 课题列表页面
const TaskList = Loadable({
loader: () => import("./taskList"),
loading: Loading,
});
function FreeProject(propsF) {
const {location: {pathname}} = propsF;
useEffect(()=>{
window.scrollTo(0, 0);
},[])
console.log('FreeProject');
return(
<div className="glcc_project">
<div className='projectBannerBox'>
<img className="glcc-banner" src={banner} alt=''></img>
</div>
<div className='head'>
<Link to={`/glcc/freesubject`} className={!pathname.endsWith('freeproject') ? 'active' : ''}>课题列表</Link>
<Link to={`/glcc/freeproject`} className={pathname.endsWith('freeproject') ? 'active' : ''}>项目列表</Link>
</div>
<div className='gobackBox'>
<a href={`/glcc`}>开源夏令营 / </a>
0元课题及项目列表
</div>
<div className="head_introduce mt30 mb30">
<h4 className="head_tit">申请说明</h4>
<div className="head_content">1参与GitLink编程夏令营0资金项目的同学请通过邮件或电话与课题导师直接沟通并根据导师课题要求完成课题无需在GLCC平台报名课题</div>
<div className="head_content">2参与GitLink编程夏令营0资金项目的同学如完成课题并经导师评定通过将获得GLCC证书1但无课题资金</div>
<div className="head_content">3活动最终解释权归GLCC所有</div>
</div>
<Spin spinning={false}>
<Switch {...propsF}>
<Route
path="/glcc/freeproject"
render={(props) => (
<ProjectList {...propsF} {...props}/>
)}
></Route>
<Route
path="/glcc/freesubject"
render={(props) => (
<TaskList {...propsF} {...props}/>
)}
></Route>
</Switch>
</Spin>
</div>
)
}
export default FreeProject;