Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help #68

Merged
merged 12 commits into from
Oct 9, 2021
Merged

Help #68

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"scripts": {
"start": "react-scripts start",
"firebase": "firebase emulators:start",
"emu": "firebase emulators:start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
Expand Down
4 changes: 2 additions & 2 deletions src/assets/styles/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $mint-bright: #e5faf3;
// Taffy
$taffy: #7e66cd;
$taffy-light: #a594dc;
$taffy-bright: #efecf9;
$taffy-bright: #f4f1ff;

$sun: #fff250;
$sun-light: #fff8a2;
Expand All @@ -28,7 +28,7 @@ $sun-bright: #fffdea;
$gray-dark: #4c547c;
$gray: #6f738b;
$gray-light: #b5b8cc;
$gray-bright: #ebebff;
$gray-bright: #fafaff;

// Feedback
$success: $mint;
Expand Down
3 changes: 3 additions & 0 deletions src/components/AdminNavigation/AdminNavigation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ const AdminNavigation = () => {
<li>
<NavLink to="/admin/dashboard">Dashboard</NavLink>
</li>
<li>
<NavLink to="/help">Help</NavLink>
</li>
<li>
<NavLink to="/admin/kids">Kids</NavLink>
</li>
Expand Down
3 changes: 3 additions & 0 deletions src/components/Footer/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ const Footer = () => {
<li>
<Link to="/about">About</Link>
</li>
<li>
<Link to="/help">Help</Link>
</li>
<li>
<Link to="/terms">Terms & Conditions</Link>
</li>
Expand Down
3 changes: 3 additions & 0 deletions src/components/HeaderNav/HeaderNav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ const HeaderNav = ({ variant }) => {
How It Works
</NavLink>
</li>
<li>
<NavLink to="/help">Help</NavLink>
</li>
<li>
<NavLink exact to="/feedback">
Feedback
Expand Down
21 changes: 21 additions & 0 deletions src/components/HelpCard/HelpCard.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from 'react';
import PropTypes from 'prop-types';
import './HelpCard.scss';

const HelpCard = ({ className, children, ...rest }) => {
return (
<div className={`HelpCard ${className || ''}`} {...rest}>
{children}
</div>
);
};

export default HelpCard;

HelpCard.propTypes = {
className: PropTypes.string,
};

HelpCard.defaultProps = {
className: '',
};
16 changes: 16 additions & 0 deletions src/components/HelpCard/HelpCard.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

@import '../../assets/styles/colors';
.HelpCard {
padding: 2rem;
border-radius: 0.5rem;
background-color: $primary-bright;
transition: 0.3s;
text-align: center;
h2 {
color: $gray;
}
&:hover {
background-color: $primary-hover;
color: $primary-bright;
}
}
1 change: 1 addition & 0 deletions src/components/HelpCard/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './HelpCard';
36 changes: 36 additions & 0 deletions src/components/HelpContentPage/HelpContentPage.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import React from 'react';
import PropTypes from 'prop-types';
import Button from '../Button';
import './HelpContentPage.scss';

const HelpContentPage = ({
className,
title,
description,
children,
...rest
}) => {
return (
<main className={`HelpContentPage ${className || ''}`} {...rest}>
<h1 className="text-center">{title}</h1>
<p className="text-center">{description}</p>
<Button size="small" variant="secondary-ghosted" href="/help">
Go Back
</Button>
{children}
<Button size="small" variant="secondary-ghosted" href="/help">
Go Back
</Button>
</main>
);
};

export default HelpContentPage;

HelpContentPage.propTypes = {
className: PropTypes.string,
};

HelpContentPage.defaultProps = {
className: '',
};
6 changes: 6 additions & 0 deletions src/components/HelpContentPage/HelpContentPage.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.HelpContentPage {
.Button {
display: table;
margin: 1rem auto;
}
}
1 change: 1 addition & 0 deletions src/components/HelpContentPage/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './HelpContentPage';
29 changes: 29 additions & 0 deletions src/components/HelpMessage/HelpMessage.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import React from 'react';
import { AiOutlineQuestionCircle } from 'react-icons/ai';
import PropTypes from 'prop-types';
import './HelpMessage.scss';

const HelpMessage = ({ className, children, ...rest }) => {
return (
<div className="HelpMessage">
<hr />
<div
className={`HelpMessageBox text-center mt-4 ${className || ''}`}
{...rest}
>
<AiOutlineQuestionCircle size="24" />
{children}
</div>
</div>
);
};

export default HelpMessage;

HelpMessage.propTypes = {
className: PropTypes.string,
};

HelpMessage.defaultProps = {
className: '',
};
20 changes: 20 additions & 0 deletions src/components/HelpMessage/HelpMessage.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@import '../../assets/styles/colors';
.HelpMessage {
hr {
margin: 1.5rem 0;
border-color: $primary-bright;
}
.HelpMessageBox {
border-radius: 0.5rem;
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
svg {
fill: $primary;
}
p {
color: $gray;
}
}
}
1 change: 1 addition & 0 deletions src/components/HelpMessage/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './HelpMessage';
30 changes: 30 additions & 0 deletions src/components/LoomVideo/LoomVideo.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React from 'react';
import { string } from 'prop-types';
import './LoomVideo.scss';

const LoomVideo = ({ className, title, embedUrl, ...rest }) => {
return (
<div className={`LoomVideo ${className}`} {...rest}>
<iframe
title={title}
src={embedUrl}
frameBorder="0"
webkitallowfullscreen
mozallowfullscreen
allowFullScreen
/>
</div>
);
};

export default LoomVideo;

LoomVideo.propTypes = {
className: string,
title: string.isRequired,
embedUrl: string.isRequired,
};

LoomVideo.defaultProps = {
className: '',
};
12 changes: 12 additions & 0 deletions src/components/LoomVideo/LoomVideo.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.LoomVideo {
position: relative;
padding-bottom: 56.25%;
height: 0;
iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
}
1 change: 1 addition & 0 deletions src/components/LoomVideo/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './LoomVideo';
2 changes: 2 additions & 0 deletions src/components/MarketingMain/MarketingMain.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { UserContext } from '../../providers/UserProvider';
import { ChildContext } from '../../providers/ChildProvider';
import ContactThankYou from '../../pages/ContactThankYou';
import './MarketingMain.scss';
import Help from '../../pages/Help';

const MarketingMain = () => {
const { user } = useContext(UserContext);
Expand All @@ -38,6 +39,7 @@ const MarketingMain = () => {
<Switch>
<Route exact path="/" component={Home} />
<Route path="/how-it-works" component={HowItWorks} />
<Route path="/help" component={Help} />
<Route path="/feedback" component={Feedback} />
<Route path="/feedback-thanks" component={FeedbackThankYou} />
<Route path="/terms" component={Terms} />
Expand Down
9 changes: 7 additions & 2 deletions src/index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@import '~bootstrap/scss/bootstrap';

@import './assets/styles/colors';
@import '~bootstrap/scss/bootstrap';
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;500;700&display=swap');

body {
Expand Down Expand Up @@ -80,8 +81,11 @@ h5,
a,
.LINK {
transition: 0.3s;
color: var(--prime);
color: $primary;
text-decoration: none;
&:hover {
text-decoration: none;
}
}
p,
li {
Expand Down Expand Up @@ -119,3 +123,4 @@ li {
.fw-bold {
font-weight: bold;
}

14 changes: 13 additions & 1 deletion src/pages/AdminKids/AdminKids.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useContext } from 'react';
import { Redirect } from 'react-router-dom';
import { Link, Redirect } from 'react-router-dom';
import { Row, Col } from 'react-bootstrap';
import { UserContext } from '../../providers/UserProvider';
import KidCard from '../../components/KidCard';
Expand All @@ -12,6 +12,7 @@ import pendingKids from '../../assets/images/bird_pending_data.svg';
import addChildIcon from '../../assets/images/add_child_white.svg';
import './AdminKids.scss';
import { ToastContext } from '../../providers/ToastProvider';
import HelpMessage from '../../components/HelpMessage';

const AdminKids = () => {
const { user } = useContext(UserContext);
Expand Down Expand Up @@ -56,6 +57,17 @@ const AdminKids = () => {
</p>
</div>
)}
<HelpMessage className="text-primary">
<p className="m-0">
Need help logging your child(ren) in?{' '}
<Link
className="LINK"
to="/help/logging-children-in"
>
Learn More
</Link>
</p>
</HelpMessage>
</Col>
<Col sm={4} className="text-center d-none d-md-block">
<DashSideForm>
Expand Down
13 changes: 11 additions & 2 deletions src/pages/AdminSetupFamily/AdminSetupFamily.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import React, { useContext, useState } from 'react';
import { useHistory } from 'react-router-dom';
import { useHistory, Link } from 'react-router-dom';
import { firestore } from '../../config/firebaseConfig';
import { UserContext } from '../../providers/UserProvider';
import Section from '../../components/Section';
import Button from '../../components/Button';
import Input from '../../components/Input';
import './AdminSetupFamily.scss';
import HelpMessage from '../../components/HelpMessage';
import { ToastContext } from '../../providers/ToastProvider';
import './AdminSetupFamily.scss';

const AdminSetupFamily = () => {
const history = useHistory();
Expand Down Expand Up @@ -104,6 +105,14 @@ const AdminSetupFamily = () => {
{feedback ? <p className="uk-text-danger">{feedback}</p> : null}
<Button type="submit">Setup Family</Button>
</form>
<HelpMessage>
<p className="m-0">
Need help logging your child(ren) in?{' '}
<Link className="LINK" to="/help/family-setup">
Learn More
</Link>
</p>
</HelpMessage>
</Section>
);
};
Expand Down
Loading