From b66dd0ca8025e9ae1baeca21a1f3e0acf9004356 Mon Sep 17 00:00:00 2001 From: KuhnChris Date: Sun, 26 May 2019 23:20:10 +0200 Subject: [PATCH] Adding FAQ page to dapp --- src/App.jsx | 12 +++++++ src/components/NavLanding.jsx | 9 +++++ src/utils/routes.js | 1 + src/views/Landing/FAQ.jsx | 58 +++++++++++++++++++++++++++++++++ src/views/styles/NewLanding.css | 8 +++++ 5 files changed, 88 insertions(+) create mode 100644 src/views/Landing/FAQ.jsx diff --git a/src/App.jsx b/src/App.jsx index 783c33ebb..4966488f4 100755 --- a/src/App.jsx +++ b/src/App.jsx @@ -21,6 +21,7 @@ import EditProfile from './views/Profile/EditProfile'; import Profiles from './views/Landing/Profiles'; import Careers from './views/Landing/Careers'; import Privacy from './views/Landing/Privacy'; +import FAQ from './views/Landing/FAQ'; import Terms from './views/Landing/Terms'; import Create from './views/Landing/Create'; import NavLanding from './components/NavLanding'; @@ -362,6 +363,17 @@ class App extends Component { )} /> + ( + + )} + /> + ( diff --git a/src/components/NavLanding.jsx b/src/components/NavLanding.jsx index 7351ce483..1d5a96499 100644 --- a/src/components/NavLanding.jsx +++ b/src/components/NavLanding.jsx @@ -109,6 +109,9 @@ class NavLanding extends Component { Blog + + FAQs + {(route !== 'hub' && !isProfilePage) && (
@@ -237,6 +240,12 @@ class NavLanding extends Component { + +
  • + FAQ +
  • + +
  • API Products diff --git a/src/utils/routes.js b/src/utils/routes.js index 92a36db88..a37f2aec3 100644 --- a/src/utils/routes.js +++ b/src/utils/routes.js @@ -19,6 +19,7 @@ export const DETAILS = 'details'; export const EDIT = 'edit'; export const COLLECTIBLES = 'collectibles'; export const CONTACTS = 'contacts'; +export const FAQ = '/faq'; // FORMAT STRUCTURE FOR REACT ROUTER export const FORMAT_PROFILE_ACTIVITY = `/:ethAddress/${ACTIVITY}`; diff --git a/src/views/Landing/FAQ.jsx b/src/views/Landing/FAQ.jsx new file mode 100644 index 000000000..55c46461f --- /dev/null +++ b/src/views/Landing/FAQ.jsx @@ -0,0 +1,58 @@ +import React from 'react'; +import propTypes from 'prop-types'; +import Footer from './components/Footer'; +import '../styles/Landing.css'; +import '../styles/Info.css'; + +const FAQ = ({ isLoggedIn, handleSignInUp }) => { + const FAQItems = [{ question: 'Question 1?', answer: '3Box!' }, + { question: 'What am I doing here?', answer: '3Box!' }, + { question: 'Aaaaaaaaaaaaaaa', answer: '3Box!' }, + { question: 'Bee-Movie Script?', answer: '3Box!' }, + { question: 'IPFS', answer: '3Box!' }, + { question: 'OrbitDB', answer: '3Box!' }, + ]; + return ( +
    +
    +
    +

    FAQ

    +
    +

    Frequently asked questions

    +
    +
    +   +
    +
    + { + FAQItems.map(q => ( +
    +

    {q.question}

    +

    + {q.answer} +

    +
    +
    + )) + } +   +
    +
    +
    + ); +}; +FAQ.defaultProps = { + handleSignInUp: null, + isLoggedIn: false, +}; + +FAQ.propTypes = { + handleSignInUp: propTypes.func, + isLoggedIn: propTypes.bool, +}; + +export default FAQ; diff --git a/src/views/styles/NewLanding.css b/src/views/styles/NewLanding.css index df366dca6..45057706f 100644 --- a/src/views/styles/NewLanding.css +++ b/src/views/styles/NewLanding.css @@ -1396,3 +1396,11 @@ pre { .careers_positions_button { width: 90%; justify-content: flex-start; } } + + +.lr-auto-mg { + margin-left: auto; + margin-right: auto; + align-content: start; + align-items: start !important; +} \ No newline at end of file