Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

Commit

Permalink
Include scholarx video guide links as a fixed hover button (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gravewalker666 authored Aug 8, 2021
1 parent f59f4d7 commit fff1ea0
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 0 deletions.
68 changes: 68 additions & 0 deletions src/scenes/Home/components/HelpButton/index.tsx
Original file line number Diff line number Diff line change
@@ -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 = (
<div>
<Title level={4}>Mentor</Title>
<Paragraph>
<ul>
<li>
<a
href="https://docs.google.com/document/d/1ZJeKxdAvHcPanXRoGP5rT-vkOTEfsYhrnqr1QVglS58/edit?usp=sharing"
target="_blank"
rel="noreferrer"
>
Mentor Guide
</a>
</li>
<li>
<a
href="https://drive.google.com/file/d/13b0xg3HdZeQohefYMY9gP8_r_G11pGFA/view?usp=sharing"
target="_blank"
rel="noreferrer"
>
Mentor Video Guide
</a>
</li>
</ul>
</Paragraph>
<Title level={4}>Mentee</Title>
<Paragraph>
<ul>
<li>
<a
href="https://drive.google.com/file/d/1vnW1bhNzETtPtiGTsphzBT2GQ6K0LuX9/view"
target="_blank"
rel="noreferrer"
>
Mentee Video Guide
</a>
</li>
</ul>
</Paragraph>
</div>
);

function HelpButton() {
return (
<div className={styles.helpPosition}>
<Popover placement="leftBottom" content={content} trigger="click">
<Button
type="primary"
shape="round"
size="large"
icon={<QuestionCircleOutlined />}
>
Watch Tutorial
</Button>
</Popover>
</div>
);
}

export default HelpButton;
9 changes: 9 additions & 0 deletions src/scenes/Home/components/HelpButton/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.helpPosition {
position: fixed;
right: 30px;
bottom: 100px;
z-index: 10;
display: flex;
flex-direction: column;
cursor: pointer;
}
2 changes: 2 additions & 0 deletions src/scenes/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -82,6 +83,7 @@ const Home = () => {
</Row>
<div className={styles.push} />
</div>
<HelpButton />
<div className={styles.footer}>
<Footer />
</div>
Expand Down
2 changes: 2 additions & 0 deletions src/scenes/Home/scenes/EditMentorApplication/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -170,6 +171,7 @@ function MentorApplication() {
</Spin>
<div className={styles.push} />
</div>
<HelpButton />
<div className={styles.footer}>
<Footer />
</div>
Expand Down
2 changes: 2 additions & 0 deletions src/scenes/Home/scenes/ManageMentees/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { API_URL } from '../../../../constants';
import { UserContext } from '../../../../index';
import { Mentee, Profile, SavedProgram } from '../../../../types';
import Footer from '../../components/Footer';
import HelpButton from '../../components/HelpButton';
import NavigationBar from '../../components/NavigationBar';
import styles from '../../styles.css';
import MenteeRow from './components/MenteeRow';
Expand Down Expand Up @@ -147,6 +148,7 @@ function ManageMentees() {
</Row>
</Spin>
</div>
<HelpButton />
<Footer />
</>
);
Expand Down
2 changes: 2 additions & 0 deletions src/scenes/Home/scenes/MentorApplication/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
getQuestions,
} 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';
Expand Down Expand Up @@ -158,6 +159,7 @@ function MentorApplication() {
</Spin>
<div className={styles.push} />
</div>
<HelpButton />
<div className={styles.footer}>
<Footer />
</div>
Expand Down
2 changes: 2 additions & 0 deletions src/scenes/Home/scenes/MentorConfirmation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { API_URL } from '../../../../constants';
import { UserContext } from '../../../../index';
import { Mentor, Profile } from '../../../../types';
import Footer from '../../components/Footer';
import HelpButton from '../../components/HelpButton';
import NavigationBar from '../../components/NavigationBar';
import mainStyles from '../../styles.css';
import styles from './styles.css';
Expand Down Expand Up @@ -257,6 +258,7 @@ function MentorConfirmation() {
)}
</Spin>
</div>
<HelpButton />
<Footer />
</>
);
Expand Down
2 changes: 2 additions & 0 deletions src/scenes/Home/scenes/RequestMentors/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { API_URL } from '../../../../constants';
import { UserContext } from '../../../../index';
import { Profile, SavedProgram } from '../../../../types';
import Footer from '../../components/Footer';
import HelpButton from '../../components/HelpButton';
import NavigationBar from '../../components/NavigationBar';
import styles from '../../styles.css';
import AppliedMentors from './components/AppliedMentors';
Expand Down Expand Up @@ -102,6 +103,7 @@ function RequestMentors() {
</div>
</Col>
</Row>
<HelpButton />
<Footer />
</>
);
Expand Down

0 comments on commit fff1ea0

Please sign in to comment.