forked from prasadhonrao/devcamper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Bootcamp component and BootcampsPage
- Create new Bootcamp component to display individual bootcamp details - Update BootcampsPage to dynamically render bootcamp data using the new component
- Loading branch information
1 parent
5e7b41f
commit e9d10ba
Showing
7 changed files
with
56 additions
and
79 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { Link } from 'react-router-dom'; | ||
import { Image } from 'react-bootstrap'; | ||
|
||
const Bootcamp = (props) => { | ||
const { image, name, rating, location, careers, id } = props.bootcamp; | ||
|
||
return ( | ||
<div className="card mb-3"> | ||
<div className="row no-gutters"> | ||
<div className="col-md-4"> | ||
<Image src={image} className="card-img" alt={name} /> | ||
</div> | ||
<div className="col-md-8"> | ||
<div className="card-body"> | ||
<h5 className="card-title"> | ||
<Link to={`/bootcamps/${id}`}> | ||
{name} | ||
<span className="float-right badge badge-success">{rating}</span> | ||
</Link> | ||
</h5> | ||
<span className="badge badge-dark mb-2">{location}</span> | ||
<p className="card-text">{careers.join(', ')}</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Bootcamp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters