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

Web: Index comp #5

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Web: Index comp #5

wants to merge 8 commits into from

Conversation

maker-jws
Copy link
Collaborator

Web: Features added:
Job Index Screen
Index Iterator Component
Index Header Card
Index base data constant (for testing)
Refactored Routes.js to include params. Will be targeting queries next

@@ -0,0 +1,10 @@
import jobShowCarousel from './jobShowCarousel'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's actually a shorthand for re-exporting like this:

export jobShowCarousel from './jobShowCarousel'

@@ -0,0 +1,34 @@
import React from 'react'
import {Carousel,Card} from 'react-bootstrap'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Re this whole file:) Whitespace matters. JS may not have semantic whitespace like Python, but good and consistent formatting makes your code more maintainable.


const JobCardHeader = ({ category, title, styling }) => (
<Card body className={ styling }>
{ category } > { title }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multiple spaces don't work like this. Also, use &gt; for > for safety.

jobShowCarousel,
jobShowHeader,
jobShowSummary
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always leave an empty line at the end of your files.

import React from 'react'
import {Carousel,Card} from 'react-bootstrap'

const items = (source) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a component? If so, two notes: 1) the name of a component should be capitalized, and 2) the only parameter should be props:

const Items = ({ source }) => {

function RoleShow(){
// const {label, title, data, style, imgArr} = JobInfo
return(
<Container>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indent

import {JobIndexInfo} from '../constants'
import {JobIndexIterator} from '../components'

function RoleShow(){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use arrow notation for functions that don't use this.

@@ -0,0 +1,20 @@
import React from 'react'
import {Container, Col, Row,} from 'react-bootstrap'
// import {jobShowHeader as Header, jobShowCarousel as JobGraphics, jobShowSummary as Summary } from '../components/Cards'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to keep imports that aren't being used. Adding import statements can be done automatically.

@@ -1,15 +1,16 @@
import React from 'react'
import {Container, Col, Row} from 'react-bootstrap'
import {jobShowHeader as Header, jobShowCarousel as JobGraphics, jobShowSummary as Summary } from '../components/Cards'
import {JobShowHeader as Header, JobShowCarousel as JobGraphics, JobShowSummary as Summary } from '../components/Cards'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If your components need different names, rename the actual components, not the imports

@@ -1,7 +1,7 @@
import React from 'react'
import { Route, Switch, BrowserRouter as Router } from 'react-router-dom'
import JobIndex from './screens/JobIndex'
import RoleShow from './screens/RoleShow'
import JobIndex from './screens/JobIndex.js'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't necessary.

@MartinRosenberg
Copy link
Contributor

Use ESLint for styling. Prettier is optional, but I find it frustrating. I'll help you set this up.

@MartinRosenberg
Copy link
Contributor

Start your commit messages with the service name, e.g. "Web:"

@MartinRosenberg
Copy link
Contributor

Try to keep everything in one commit related, and keep the commits small.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants