Hello!
This was a neat challenge, as I got to utilize React Context for the first time. I'm not sure how I would feel using it in a larger application (over, say, Redux), but it went fairly smooth. It's also the first React App I've deployed without using CRA, so there were a few growing pains.
Two general questions:
- How does the site look? I used mobile-first, but noted that the desktop app felt weird around 900px. The layout of each card smashed together, and it felt kind of messy, hence why I set the media query to 900px.
- SVG bundling - The longest part of this project was figuring out how to load the SVGs without manually placing them in dist/ or build/. I eventually just placed them with the components, and imported each into index.js one at a time. Is there a better way to do that?
As far as I could tell, I couldn't automate the import in JobInfo.js.
const JobInfo = ({ listing }) => {
return (
<div className="job__info--container">
<img src={listing.logo} className="job__info--picture"/>
<div className="job__info--listing-container">
<p className="job__info--company">{listing.company}</p>
<div className="job__info--extra-container">
listing.logo is the company logo photo, a SVG file, pulled from State from the parent component.
So I did this in index.js:
import './public/styles/main.scss';
import './components/listings/images/account.svg';
import './components/listings/images/eyecam-co.svg';
import './components/listings/images/faceit.svg';
import './components/listings/images/insure.svg';
import './components/listings/images/loop-studios.svg';
...
Is this the intended way to access assets like this? Thanks for any feedback!