From b4f574b2be296cdef3944ce35ff4aee83ce43c16 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Fri, 15 Jan 2016 02:46:25 -0800 Subject: [PATCH] Update jobs to remove all panels and wells --- common/app/components/Nav/Nav.jsx | 33 +------------- .../routes/Jobs/components/CreateJobModal.jsx | 43 ------------------- .../app/routes/Jobs/components/GoToPayPal.jsx | 6 +-- .../routes/Jobs/components/JobNotFound.jsx | 6 +-- common/app/routes/Jobs/components/NewJob.jsx | 19 +++++--- .../Jobs/components/NewJobCompleted.jsx | 6 +-- common/app/routes/Jobs/components/Preview.jsx | 8 ++-- common/app/routes/Jobs/components/ShowJob.jsx | 12 +++--- .../app/routes/Jobs/components/TwitterBtn.jsx | 33 -------------- 9 files changed, 35 insertions(+), 131 deletions(-) delete mode 100644 common/app/routes/Jobs/components/CreateJobModal.jsx delete mode 100644 common/app/routes/Jobs/components/TwitterBtn.jsx diff --git a/common/app/components/Nav/Nav.jsx b/common/app/components/Nav/Nav.jsx index 6cdb2faaea1..283bdd60bfc 100644 --- a/common/app/components/Nav/Nav.jsx +++ b/common/app/components/Nav/Nav.jsx @@ -11,7 +11,6 @@ import { import navLinks from './links.json'; import FCCNavItem from './NavItem.jsx'; -const win = typeof window !== 'undefined' ? window : {}; const fCClogo = 'https://s3.amazonaws.com/freecodecamp/freecodecamp_logo.svg'; const logoElement = ( @@ -29,16 +28,6 @@ const toggleButtonChild = ( ); -function getDashedName() { - let challengeDashedName; - if (typeof win.localStorage !== 'undefined') { - challengeDashedName = win.localStorage.getItem('currentDashedName'); - } - return challengeDashedName && challengeDashedName !== 'undefined' ? - challengeDashedName : - ''; -} - export default React.createClass({ displayName: 'Nav', @@ -76,22 +65,6 @@ export default React.createClass({ }); }, - renderLearnBtn() { - return ( - { - const challengeDashedName = getDashedName(); - const goTo = challengeDashedName ? - '/challenges/' + challengeDashedName : - '/map'; - win.location = goTo; - }}> - Learn - - ); - }, - renderPoints(username, points) { if (!username) { return null; @@ -120,12 +93,11 @@ export default React.createClass({ ); } else { return ( - Sign In - + ); } }, @@ -144,7 +116,6 @@ export default React.createClass({ className='hamburger-dropdown' navbar={ true } pullRight={ true }> - { this.renderLearnBtn() } { this.renderLinks() } { this.renderPoints(username, points) } { this.renderSignin(username, picture) } diff --git a/common/app/routes/Jobs/components/CreateJobModal.jsx b/common/app/routes/Jobs/components/CreateJobModal.jsx deleted file mode 100644 index 446ed957d62..00000000000 --- a/common/app/routes/Jobs/components/CreateJobModal.jsx +++ /dev/null @@ -1,43 +0,0 @@ -import React, { PropTypes } from 'react'; -import { History } from 'react-router'; -import { Button, Modal } from 'react-bootstrap'; - -export default React.createClass({ - displayName: 'CreateJobsModal', - - propTypes: { - onHide: PropTypes.func, - showModal: PropTypes.bool - }, - - mixins: [History], - - goToNewJob(onHide) { - onHide(); - this.history.pushState(null, '/jobs/new'); - }, - - render() { - const { - showModal, - onHide - } = this.props; - - return ( - - -

Welcome to Free Code Camp's board

-

We post jobs specifically target to our junior developers.

- -
-
- ); - } -}); diff --git a/common/app/routes/Jobs/components/GoToPayPal.jsx b/common/app/routes/Jobs/components/GoToPayPal.jsx index a32605e960c..55c5ad179d2 100644 --- a/common/app/routes/Jobs/components/GoToPayPal.jsx +++ b/common/app/routes/Jobs/components/GoToPayPal.jsx @@ -1,5 +1,5 @@ import React, { PropTypes } from 'react'; -import { Button, Input, Col, Panel, Row, Well } from 'react-bootstrap'; +import { Button, Input, Col, Row, Well } from 'react-bootstrap'; import { contain } from 'thundercats-react'; // real paypal buttons @@ -177,7 +177,7 @@ export default contain( sm={ 8 } smOffset={ 2 } xs={ 12 }> - +
- +
diff --git a/common/app/routes/Jobs/components/JobNotFound.jsx b/common/app/routes/Jobs/components/JobNotFound.jsx index c4981d22f82..343e068f569 100644 --- a/common/app/routes/Jobs/components/JobNotFound.jsx +++ b/common/app/routes/Jobs/components/JobNotFound.jsx @@ -1,6 +1,6 @@ import React from 'react'; import { LinkContainer } from 'react-router-bootstrap'; -import { Button, Row, Col, Panel } from 'react-bootstrap'; +import { Button, Row, Col } from 'react-bootstrap'; export default React.createClass({ displayName: 'NoJobFound', @@ -12,7 +12,7 @@ export default React.createClass({ - +
No job found...
diff --git a/common/app/routes/Jobs/components/NewJob.jsx b/common/app/routes/Jobs/components/NewJob.jsx index 414264f5dee..3683895f717 100644 --- a/common/app/routes/Jobs/components/NewJob.jsx +++ b/common/app/routes/Jobs/components/NewJob.jsx @@ -17,9 +17,7 @@ import { Button, Col, Input, - Row, - Panel, - Well + Row } from 'react-bootstrap'; import { @@ -277,7 +275,7 @@ export default contain({ - +
@@ -292,6 +290,7 @@ export default contain({ xsOffset={ 3 }> - +
); } diff --git a/common/app/routes/Jobs/components/Preview.jsx b/common/app/routes/Jobs/components/Preview.jsx index fe8d7868d1a..dd1734210dd 100644 --- a/common/app/routes/Jobs/components/Preview.jsx +++ b/common/app/routes/Jobs/components/Preview.jsx @@ -1,6 +1,6 @@ import React, { PropTypes } from 'react'; import { Lifecycle } from 'react-router'; -import { Panel, Button, Row, Col } from 'react-bootstrap'; +import { Button, Row, Col } from 'react-bootstrap'; import { contain } from 'thundercats-react'; import ShowJob from './ShowJob.jsx'; @@ -51,12 +51,14 @@ export default contain( return (
+
+
- +
- +
diff --git a/common/app/routes/Jobs/components/ShowJob.jsx b/common/app/routes/Jobs/components/ShowJob.jsx index db9cf511e50..8adc2b7dc73 100644 --- a/common/app/routes/Jobs/components/ShowJob.jsx +++ b/common/app/routes/Jobs/components/ShowJob.jsx @@ -1,5 +1,5 @@ import React, { PropTypes } from 'react'; -import { Well, Row, Col, Thumbnail, Panel } from 'react-bootstrap'; +import { Row, Col, Thumbnail } from 'react-bootstrap'; import urlRegexFactory from 'url-regex'; const urlRegex = urlRegexFactory(); @@ -56,17 +56,18 @@ export default React.createClass({ return ( +
- +
{ preview ? 'How do I apply?' : message }

- +
); @@ -98,7 +99,7 @@ export default React.createClass({ md={ 10 } mdOffset={ 1 } xs={ 12 }> - +

{ company } @@ -123,6 +124,7 @@ export default React.createClass({ { locale ? locale : `${city}, ${state}` } +
{ this.renderHowToApply(showApply, preview, message, howToApply) } - +

diff --git a/common/app/routes/Jobs/components/TwitterBtn.jsx b/common/app/routes/Jobs/components/TwitterBtn.jsx deleted file mode 100644 index 7998353ffcc..00000000000 --- a/common/app/routes/Jobs/components/TwitterBtn.jsx +++ /dev/null @@ -1,33 +0,0 @@ -import React, { PropTypes } from 'react'; -import { Button } from 'react-bootstrap'; - -const followLink = 'https://twitter.com/intent/follow?' + - 'ref_src=twsrc%5Etfw&region=follow_link&screen_name=CamperJobs&' + - 'amp;tw_p=followbutton'; - -function commify(count) { - return Number(count).toLocaleString('en'); -} - -export default React.createClass({ - - displayName: 'FollowButton', - - propTypes: { - count: PropTypes.number - }, - - render() { - const { count } = this.props; - return ( - - ); - } -});