feat(prettier): Use prettier for client code
This commit is contained in:
@ -11,7 +11,7 @@ module.exports = {
|
|||||||
'gatsby-plugin-react-helmet',
|
'gatsby-plugin-react-helmet',
|
||||||
{
|
{
|
||||||
resolve: 'gatsby-plugin-create-client-paths',
|
resolve: 'gatsby-plugin-create-client-paths',
|
||||||
options: { prefixes: ['/certification/*', '/unsubscribed/*'] }
|
options: { prefixes: ['/certification/*', '/unsubscribed/*', '/user/*'] }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
resolve: 'gatsby-plugin-manifest',
|
resolve: 'gatsby-plugin-manifest',
|
||||||
@ -27,4 +27,4 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
'gatsby-plugin-sitemap'
|
'gatsby-plugin-sitemap'
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
|
1140
client/package-lock.json
generated
1140
client/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -42,12 +42,18 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "node ../config/ensure-env.js && gatsby build",
|
"build": "node ../config/ensure-env.js && gatsby build",
|
||||||
"develop": "gatsby develop",
|
"develop": "gatsby develop",
|
||||||
"format": "prettier --write '**/*.js'",
|
"format:gatsby": "prettier-eslint --write --trailing-comma none --single-quote './gatsby-*.js'",
|
||||||
|
"format:src": "prettier-eslint --write --trailing-comma none --single-quote './src/**/*.js'",
|
||||||
|
"format:utils": "prettier-eslint --write --trailing-comma none --single-quote './utils/**/*.js'",
|
||||||
|
"format": "npm run format:gatsby && npm run format:src && npm run format:utils",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-plugin-transform-imports": "^1.5.0",
|
"babel-plugin-transform-imports": "^1.5.0",
|
||||||
"prettier": "^1.14.2"
|
"eslint": "^5.5.0",
|
||||||
|
"eslint-config-freecodecamp": "^1.1.1",
|
||||||
|
"prettier": "^1.14.2",
|
||||||
|
"prettier-eslint-cli": "^4.7.1"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import React from 'react'
|
import React from 'react';
|
||||||
import { Grid, Panel, Button } from '@freecodecamp/react-bootstrap'
|
import { Grid, Panel, Button } from '@freecodecamp/react-bootstrap';
|
||||||
|
|
||||||
import env from '../../config/env.json'
|
import env from '../../config/env.json';
|
||||||
import Layout from '../components/Layout'
|
import Layout from '../components/Layout';
|
||||||
import FullWidthRow from '../components/helpers/FullWidthRow'
|
import FullWidthRow from '../components/helpers/FullWidthRow';
|
||||||
import { Spacer } from '../components/helpers'
|
import { Spacer } from '../components/helpers';
|
||||||
|
|
||||||
const { apiLocation } = env;
|
const { apiLocation } = env;
|
||||||
|
|
||||||
@ -15,7 +15,7 @@ function ShowUnsubscribed({ unsubscribeId }) {
|
|||||||
<FullWidthRow>
|
<FullWidthRow>
|
||||||
<Spacer />
|
<Spacer />
|
||||||
<Spacer />
|
<Spacer />
|
||||||
<Panel bsStyle="primary" className="text-center">
|
<Panel bsStyle='primary' className='text-center'>
|
||||||
<Spacer />
|
<Spacer />
|
||||||
<h2>You have successfully been unsubscribed</h2>
|
<h2>You have successfully been unsubscribed</h2>
|
||||||
<p>Whatever you go on to, keep coding!</p>
|
<p>Whatever you go on to, keep coding!</p>
|
||||||
@ -24,20 +24,20 @@ function ShowUnsubscribed({ unsubscribeId }) {
|
|||||||
{unsubscribeId ? (
|
{unsubscribeId ? (
|
||||||
<FullWidthRow>
|
<FullWidthRow>
|
||||||
<Button
|
<Button
|
||||||
bsStyle="primary"
|
|
||||||
bsSize="lg"
|
|
||||||
block={true}
|
block={true}
|
||||||
|
bsSize='lg'
|
||||||
|
bsStyle='primary'
|
||||||
href={`${apiLocation}/internal/resubscribe/${unsubscribeId}`}
|
href={`${apiLocation}/internal/resubscribe/${unsubscribeId}`}
|
||||||
>
|
>
|
||||||
You can click here to resubscribe
|
You can click here to resubscribe
|
||||||
</Button>
|
</Button>
|
||||||
</FullWidthRow>
|
</FullWidthRow>
|
||||||
) : null}
|
) : null}
|
||||||
</Grid>
|
</Grid>
|
||||||
</Layout>
|
</Layout>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
ShowUnsubscribed.displayName = 'ShowUnsubscribed'
|
ShowUnsubscribed.displayName = 'ShowUnsubscribed';
|
||||||
|
|
||||||
export default ShowUnsubscribed
|
export default ShowUnsubscribed;
|
||||||
|
37
client/src/client-only-routes/ShowUser.js
Normal file
37
client/src/client-only-routes/ShowUser.js
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
import { createSelector } from 'reselect';
|
||||||
|
import { isSignedInSelector, userFetchStateSelector } from '../redux';
|
||||||
|
import Layout from '../components/Layout';
|
||||||
|
import { Spacer } from '../components/helpers';
|
||||||
|
|
||||||
|
const propTypes = {
|
||||||
|
isSignedIn: PropTypes.bool,
|
||||||
|
userFetchState: PropTypes.shape({
|
||||||
|
pending: PropTypes.bool,
|
||||||
|
comnplete: PropTypes.bool,
|
||||||
|
errored: PropTypes.bool
|
||||||
|
}),
|
||||||
|
username: PropTypes.string
|
||||||
|
};
|
||||||
|
|
||||||
|
const mapStateToProps = createSelector(
|
||||||
|
isSignedInSelector,
|
||||||
|
userFetchStateSelector,
|
||||||
|
(isSignedIn, userFetchState) => ({ isSignedIn, userFetchState })
|
||||||
|
);
|
||||||
|
|
||||||
|
function ShowUser() {
|
||||||
|
return (
|
||||||
|
<Layout>
|
||||||
|
<Spacer />
|
||||||
|
<h1>ShowUser</h1>
|
||||||
|
</Layout>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
ShowUser.displayName = 'ShowUser';
|
||||||
|
ShowUser.propTypes = propTypes;
|
||||||
|
|
||||||
|
export default connect(mapStateToProps)(ShowUser);
|
@ -1,9 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
function ButtonSpacer() {
|
function ButtonSpacer() {
|
||||||
return (
|
return <div className='button-spacer' />;
|
||||||
<div className='button-spacer' />
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ButtonSpacer.displayName = 'ButtonSpacer';
|
ButtonSpacer.displayName = 'ButtonSpacer';
|
||||||
|
@ -5,8 +5,8 @@ import { Row, Col } from '@freecodecamp/react-bootstrap';
|
|||||||
function FullWidthRow({ children }) {
|
function FullWidthRow({ children }) {
|
||||||
return (
|
return (
|
||||||
<Row>
|
<Row>
|
||||||
<Col sm={ 8 } smOffset={ 2 } xs={ 12 }>
|
<Col sm={8} smOffset={2} xs={12}>
|
||||||
{ children }
|
{children}
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
);
|
);
|
||||||
|
@ -2,9 +2,7 @@ import React from 'react';
|
|||||||
import Spinner from 'react-spinkit';
|
import Spinner from 'react-spinkit';
|
||||||
|
|
||||||
function Loader() {
|
function Loader() {
|
||||||
return (
|
return <Spinner name='ball-clip-rotate-multiple' />;
|
||||||
<Spinner name='ball-clip-rotate-multiple'/>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Loader.displayName = 'Loader';
|
Loader.displayName = 'Loader';
|
||||||
|
@ -5,7 +5,7 @@ import styles from './skeletonStyles';
|
|||||||
function SkeletonSprite() {
|
function SkeletonSprite() {
|
||||||
return (
|
return (
|
||||||
<div className='sprite-container'>
|
<div className='sprite-container'>
|
||||||
<style dangerouslySetInnerHTML={ { __html: styles } } />
|
<style dangerouslySetInnerHTML={{ __html: styles }} />
|
||||||
<svg className='sprite-svg'>
|
<svg className='sprite-svg'>
|
||||||
<rect
|
<rect
|
||||||
className='sprite'
|
className='sprite'
|
||||||
|
@ -5,8 +5,8 @@ import { Row, Col } from '@freecodecamp/react-bootstrap';
|
|||||||
function SlimWidthRow({ children, ...restProps }) {
|
function SlimWidthRow({ children, ...restProps }) {
|
||||||
return (
|
return (
|
||||||
<Row {...restProps}>
|
<Row {...restProps}>
|
||||||
<Col md={ 6 } mdOffset={ 3 } sm={ 12 }>
|
<Col md={6} mdOffset={3} sm={12}>
|
||||||
{ children }
|
{children}
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
);
|
);
|
||||||
|
@ -6,7 +6,6 @@ import ShowCertification from '../client-only-routes/ShowCertification';
|
|||||||
|
|
||||||
import './certification.css';
|
import './certification.css';
|
||||||
|
|
||||||
|
|
||||||
class Certification extends Component {
|
class Certification extends Component {
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import React from 'react'
|
import React from 'react';
|
||||||
import { Grid } from '@freecodecamp/react-bootstrap'
|
import { Grid } from '@freecodecamp/react-bootstrap';
|
||||||
|
|
||||||
import Layout from '../components/Layout'
|
import Layout from '../components/Layout';
|
||||||
import FullWidthRow from '../components/helpers/FullWidthRow'
|
import FullWidthRow from '../components/helpers/FullWidthRow';
|
||||||
import { Spacer } from '../components/helpers';
|
import { Spacer } from '../components/helpers';
|
||||||
|
|
||||||
function SoftwareResourcesForNonProfits() {
|
function SoftwareResourcesForNonProfits() {
|
||||||
@ -12,7 +12,7 @@ function SoftwareResourcesForNonProfits() {
|
|||||||
<Spacer />
|
<Spacer />
|
||||||
<Grid>
|
<Grid>
|
||||||
<FullWidthRow>
|
<FullWidthRow>
|
||||||
<h2 className="text-center">Software Resources for Nonprofits</h2>
|
<h2 className='text-center'>Software Resources for Nonprofits</h2>
|
||||||
<hr />
|
<hr />
|
||||||
<p>
|
<p>
|
||||||
Please note that freeCodeCamp is not partnered with, nor do we
|
Please note that freeCodeCamp is not partnered with, nor do we
|
||||||
@ -24,37 +24,37 @@ function SoftwareResourcesForNonProfits() {
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="http://givecamp.org/"
|
href='http://givecamp.org/'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
Give Camp
|
Give Camp
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="http://www.volunteermatch.com"
|
href='http://www.volunteermatch.com'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
Volunteer Match.com
|
Volunteer Match.com
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="http://www.catchafire.org"
|
href='http://www.catchafire.org'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
Catchafire
|
Catchafire
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="http://anyonecanhaveawebsite.com"
|
href='http://anyonecanhaveawebsite.com'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
Anyone Can Have A Website
|
Anyone Can Have A Website
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@ -63,47 +63,47 @@ function SoftwareResourcesForNonProfits() {
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="https://www.youtube.com/watch?v=4AXDKWuY9QM"
|
href='https://www.youtube.com/watch?v=4AXDKWuY9QM'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
How to build and deploy a website without writing any code for
|
How to build and deploy a website without writing any code for
|
||||||
free
|
free
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="http://www.wix.com/"
|
href='http://www.wix.com/'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
Wix
|
Wix
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="https://www.squarespace.com/"
|
href='https://www.squarespace.com/'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
Square Space
|
Square Space
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="https://wordpress.com/"
|
href='https://wordpress.com/'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
WordPress
|
WordPress
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="https://xprs.imcreator.com"
|
href='https://xprs.imcreator.com'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
Imcreator.com
|
Imcreator.com
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@ -112,82 +112,82 @@ function SoftwareResourcesForNonProfits() {
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="http://causesignal.com"
|
href='http://causesignal.com'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
Cause Signal
|
Cause Signal
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="https://www.thedatabank.com/"
|
href='https://www.thedatabank.com/'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
The Data Bank
|
The Data Bank
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="http://www.donorsnap.com/"
|
href='http://www.donorsnap.com/'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
Donor Snap
|
Donor Snap
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="http://www.donorperfect.com/"
|
href='http://www.donorperfect.com/'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
Donor Perfect
|
Donor Perfect
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="https://www.blackbaud.com/fundraising-crm/etapestry-donor-management"
|
href='https://www.blackbaud.com/fundraising-crm/etapestry-donor-management'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
E Tapestry
|
E Tapestry
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="http://www.z2systems.com"
|
href='http://www.z2systems.com'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
Z2 Systems
|
Z2 Systems
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="http://www.regpacks.com/volunteer-management"
|
href='http://www.regpacks.com/volunteer-management'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
Reg Packs
|
Reg Packs
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="http://sumac.com"
|
href='http://sumac.com'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
Sumac
|
Sumac
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="http://www.volgistics.com"
|
href='http://www.volgistics.com'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
Volgistics
|
Volgistics
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@ -196,28 +196,28 @@ function SoftwareResourcesForNonProfits() {
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="https://www.ordoro.com"
|
href='https://www.ordoro.com'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
Ordoro
|
Ordoro
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="http://www.unleashedsoftware.com"
|
href='http://www.unleashedsoftware.com'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
Unleashed Software
|
Unleashed Software
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="https://www.ezofficeinventory.com/industries/non-profits"
|
href='https://www.ezofficeinventory.com/industries/non-profits'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
EZ Office Inventory
|
EZ Office Inventory
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@ -226,37 +226,37 @@ function SoftwareResourcesForNonProfits() {
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="http://www.dokeos.com"
|
href='http://www.dokeos.com'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
Dokeos
|
Dokeos
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="http://www.efrontlearning.net/"
|
href='http://www.efrontlearning.net/'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
E Front Learning
|
E Front Learning
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="https://moodle.org/"
|
href='https://moodle.org/'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
Moodle
|
Moodle
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="https://sakaiproject.org/"
|
href='https://sakaiproject.org/'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
Sakai Project
|
Sakai Project
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@ -265,19 +265,19 @@ function SoftwareResourcesForNonProfits() {
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="https://civicrm.org/"
|
href='https://civicrm.org/'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
CiviCRM
|
CiviCRM
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="http://tcmgr.com/"
|
href='http://tcmgr.com/'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
Total Community Manager
|
Total Community Manager
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@ -286,19 +286,19 @@ function SoftwareResourcesForNonProfits() {
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="http://www.google.com/forms"
|
href='http://www.google.com/forms'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
Google Forms
|
Google Forms
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="http://www.typeform.com"
|
href='http://www.typeform.com'
|
||||||
target="_blank"
|
rel='noopener noreferrer'
|
||||||
rel="noopener noreferrer"
|
target='_blank'
|
||||||
>
|
>
|
||||||
Typeform
|
Typeform
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@ -306,9 +306,9 @@ function SoftwareResourcesForNonProfits() {
|
|||||||
</FullWidthRow>
|
</FullWidthRow>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Layout>
|
</Layout>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
SoftwareResourcesForNonProfits.displayName = 'SoftwareResourcesForNonProfits'
|
SoftwareResourcesForNonProfits.displayName = 'SoftwareResourcesForNonProfits';
|
||||||
|
|
||||||
export default SoftwareResourcesForNonProfits
|
export default SoftwareResourcesForNonProfits;
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
import React from 'react'
|
import React from 'react';
|
||||||
import { Router } from '@reach/router'
|
import { Router } from '@reach/router';
|
||||||
|
|
||||||
import RedirectHome from '../components/RedirectHome'
|
import RedirectHome from '../components/RedirectHome';
|
||||||
import ShowUnsubscribed from '../client-only-routes/ShowUnsubscribed'
|
import ShowUnsubscribed from '../client-only-routes/ShowUnsubscribed';
|
||||||
|
|
||||||
function Unsubscribed() {
|
function Unsubscribed() {
|
||||||
return (
|
return (
|
||||||
<Router>
|
<Router>
|
||||||
<ShowUnsubscribed path="/unsubscribed/:unsubscribeId" />
|
<ShowUnsubscribed path='/unsubscribed/:unsubscribeId' />
|
||||||
<ShowUnsubscribed path='/unsubscribed' />
|
<ShowUnsubscribed path='/unsubscribed' />
|
||||||
<RedirectHome default={true} />
|
<RedirectHome default={true} />
|
||||||
</Router>
|
</Router>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Unsubscribed.displayName = 'Unsubscribed'
|
Unsubscribed.displayName = 'Unsubscribed';
|
||||||
|
|
||||||
export default Unsubscribed
|
export default Unsubscribed;
|
||||||
|
18
client/src/pages/user.js
Normal file
18
client/src/pages/user.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { Router } from '@reach/router';
|
||||||
|
|
||||||
|
import RedirectHome from '../components/RedirectHome';
|
||||||
|
import ShowUser from '../client-only-routes/ShowUser';
|
||||||
|
|
||||||
|
function User() {
|
||||||
|
return (
|
||||||
|
<Router>
|
||||||
|
<ShowUser path='/user/:username/report-user' />
|
||||||
|
<RedirectHome default={true} />
|
||||||
|
</Router>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
User.displayName = 'User';
|
||||||
|
|
||||||
|
export default User;
|
@ -7,10 +7,7 @@ import rootSaga from './rootSaga';
|
|||||||
const sagaMiddleware = createSagaMiddleware();
|
const sagaMiddleware = createSagaMiddleware();
|
||||||
|
|
||||||
export const createStore = () => {
|
export const createStore = () => {
|
||||||
const store = reduxCreateStore(
|
const store = reduxCreateStore(rootReducer, applyMiddleware(sagaMiddleware));
|
||||||
rootReducer,
|
|
||||||
applyMiddleware(sagaMiddleware)
|
|
||||||
);
|
|
||||||
sagaMiddleware.run(rootSaga);
|
sagaMiddleware.run(rootSaga);
|
||||||
return store;
|
return store;
|
||||||
};
|
};
|
||||||
|
@ -7,10 +7,7 @@ function* fetchSessionUser() {
|
|||||||
console.log('fetchSessionUser');
|
console.log('fetchSessionUser');
|
||||||
try {
|
try {
|
||||||
const {
|
const {
|
||||||
data: {
|
data: { user = {}, result = '' }
|
||||||
user = {},
|
|
||||||
result = ''
|
|
||||||
}
|
|
||||||
} = yield call(getSessionUser);
|
} = yield call(getSessionUser);
|
||||||
const appUser = user[result];
|
const appUser = user[result];
|
||||||
yield put(fetchUserComplete({ user: appUser, username: result }));
|
yield put(fetchUserComplete({ user: appUser, username: result }));
|
||||||
|
@ -3,7 +3,5 @@ import { all } from 'redux-saga/effects';
|
|||||||
import { sagas as appSagas } from './';
|
import { sagas as appSagas } from './';
|
||||||
|
|
||||||
export default function* rootSaga() {
|
export default function* rootSaga() {
|
||||||
yield all([
|
yield all([...appSagas]);
|
||||||
...appSagas
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,5 @@ function* updateMyEmailSaga({ payload: newEmail }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function createUpdateMyEmailSaga(types) {
|
export function createUpdateMyEmailSaga(types) {
|
||||||
return [
|
return [takeEvery(types.updateMyEmail, updateMyEmailSaga)];
|
||||||
takeEvery(types.updateMyEmail, updateMyEmailSaga)
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import words from './words.json';
|
import words from './words.json';
|
||||||
|
|
||||||
function randomItem(arr) {
|
function randomItem(arr) {
|
||||||
return arr[ Math.floor(Math.random() * arr.length) ];
|
return arr[Math.floor(Math.random() * arr.length)];
|
||||||
}
|
}
|
||||||
|
|
||||||
export function randomQuote() {
|
export function randomQuote() {
|
||||||
|
1786
package-lock.json
generated
1786
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -5,6 +5,7 @@
|
|||||||
"develop": "node ./config/ensure-env.js && node develop-client-server.js"
|
"develop": "node ./config/ensure-env.js && node develop-client-server.js"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"eslint-config-freecodecamp": "^1.1.1",
|
||||||
"tree-kill": "^1.2.0"
|
"tree-kill": "^1.2.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
Reference in New Issue
Block a user