diff --git a/src/scenes/Home/components/ActivePrograms/index.tsx b/src/scenes/Home/components/ActivePrograms/index.tsx index 4544142..148215e 100644 --- a/src/scenes/Home/components/ActivePrograms/index.tsx +++ b/src/scenes/Home/components/ActivePrograms/index.tsx @@ -179,20 +179,23 @@ function ActivePrograms() { )} {(program.state === 'MENTOR_CONFIRMATION' || program.state === 'ONGOING') && - !isUserAdmin && - user != null && - !mentoringPrograms.length ? ( - - ) : null} + !isUserAdmin && + user != null && + !mentoringPrograms.some( + (mentoringProgram) => + mentoringProgram.id == program.id + ) && ( + + )} {program.state === 'MENTOR_SELECTION' && !isUserAdmin && ( @@ -207,14 +210,20 @@ function ActivePrograms() { )} {program.state === 'MENTOR_CONFIRMATION' && !isUserAdmin && - (mentoringPrograms.length || user === null) ? ( + (user === null || + mentoringPrograms.some( + (mentoringProgram) => mentoringProgram.id == program.id + )) ? ( Mentor Confirmation Period ) : null} {program.state === 'ONGOING' && !isUserAdmin && - (mentoringPrograms.length || user === null) ? ( + (mentoringPrograms.some( + (mentoringProgram) => mentoringProgram.id == program.id + ) || + user === null) ? ( Ongoing diff --git a/src/scenes/Home/components/AddProgram/index.tsx b/src/scenes/Home/components/AddProgram/index.tsx index 36bf41a..9e18600 100644 --- a/src/scenes/Home/components/AddProgram/index.tsx +++ b/src/scenes/Home/components/AddProgram/index.tsx @@ -86,27 +86,46 @@ function AddProgram() { onFinish={addProgram} form={form} > - + diff --git a/src/scenes/Home/components/HelpButton/index.tsx b/src/scenes/Home/components/HelpButton/index.tsx new file mode 100644 index 0000000..fd96c1e --- /dev/null +++ b/src/scenes/Home/components/HelpButton/index.tsx @@ -0,0 +1,68 @@ +import React from 'react'; + +import { QuestionCircleOutlined } from '@ant-design/icons'; +import { Button, Popover, Typography } from 'antd'; + +import styles from './styles.css'; + +const { Paragraph, Title } = Typography; +const content = ( +
+ Mentor + + + + Mentee + + + +
+); + +function HelpButton() { + return ( +
+ + + +
+ ); +} + +export default HelpButton; diff --git a/src/scenes/Home/components/HelpButton/styles.css b/src/scenes/Home/components/HelpButton/styles.css new file mode 100644 index 0000000..eb3bd0d --- /dev/null +++ b/src/scenes/Home/components/HelpButton/styles.css @@ -0,0 +1,9 @@ +.helpPosition { + position: fixed; + right: 30px; + bottom: 100px; + z-index: 10; + display: flex; + flex-direction: column; + cursor: pointer; +} diff --git a/src/scenes/Home/index.tsx b/src/scenes/Home/index.tsx index c2fd9c0..7e33414 100644 --- a/src/scenes/Home/index.tsx +++ b/src/scenes/Home/index.tsx @@ -8,6 +8,7 @@ import { trackPageWithGoogleAnalytics } from '../../util/google-analytics'; import ActivePrograms from './components/ActivePrograms'; import CompletedPrograms from './components/CompletedPrograms'; import Footer from './components/Footer'; +import HelpButton from './components/HelpButton'; import MenteePrograms from './components/MenteePrograms'; import MentorPrograms from './components/MentorPrograms'; import NavigationBar from './components/NavigationBar'; @@ -82,6 +83,7 @@ const Home = () => {
+
diff --git a/src/scenes/Home/scenes/EditMentorApplication/index.tsx b/src/scenes/Home/scenes/EditMentorApplication/index.tsx index 933b4f5..52f5418 100644 --- a/src/scenes/Home/scenes/EditMentorApplication/index.tsx +++ b/src/scenes/Home/scenes/EditMentorApplication/index.tsx @@ -19,6 +19,7 @@ import { } from '../../../../util/mentor-services'; import { getProgramDetails } from '../../../../util/program-services'; import Footer from '../../components/Footer'; +import HelpButton from '../../components/HelpButton'; import NavigationBar from '../../components/NavigationBar'; import Result from '../../components/ResultScreen'; import mainStyles from '../../styles.css'; @@ -126,15 +127,20 @@ function MentorApplication() { {responses.length > 0 && responses.map( (question: QuestionResponse, index: number) => ( - + {index + 1}.{question.question.question}