Skip to content

Commit

Permalink
- Set file upload file to UI directory
Browse files Browse the repository at this point in the history
- Remove lint errors
- Display bootcamp images from images directory
  • Loading branch information
prasadhonrao committed Oct 21, 2024
1 parent cf289de commit 4bcdc62
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ geocoder_provider=mapquest
geocoder_api_key= # Get your API key from https://developer.mapquest.com/

# File upload configuration
file_upload_path=./public/uploads
file_upload_path=../ui/public/images
max_file_upload=1000000

# JWT configuration
Expand Down
Binary file added ui/public/images/no-photo.png
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.
4 changes: 2 additions & 2 deletions ui/src/components/Bootcamp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const Bootcamp = ({ id, photo, name, averageRating, location, careers }) => {
<div className="card mb-3">
<div className="row no-gutters">
<div className="col-md-4">
<Image src={photo} className="card-img" alt={name} />
<Image src={`/images/${photo}`} className="card-img full-size-image" alt={name} />
</div>
<div className="col-md-8">
<div className="card-body">
Expand All @@ -33,7 +33,7 @@ Bootcamp.propTypes = {
id: PropTypes.string.isRequired,
photo: PropTypes.string.isRequired,
name: PropTypes.string.isRequired,
averageRating: PropTypes.number.isRequired,
averageRating: PropTypes.number,
location: PropTypes.object.isRequired,
careers: PropTypes.array.isRequired,
};
Expand Down
4 changes: 2 additions & 2 deletions ui/src/components/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ function Header({ isAuthenticated, setIsAuthenticated }) {
}

Header.propTypes = {
isAuthenticated: PropTypes.bool.isRequired,
setIsAuthenticated: PropTypes.func.isRequired,
isAuthenticated: PropTypes.bool,
setIsAuthenticated: PropTypes.func,
};

export default Header;
6 changes: 6 additions & 0 deletions ui/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,9 @@ img {
align-items: center;
height: 100vh; /* Full viewport height */
}

.full-size-image {
width: 100%;
height: 100%;
object-fit: cover;
}

0 comments on commit 4bcdc62

Please sign in to comment.