Design comparison
Solution retrospective
Had some problems with React Routers, but in the end everything working proparly
Community feedback
- @JaneMorozPosted about 2 years ago
Hey there π You've done great!
- I confirm that images don't load
- Also I've noticed some netlify issue if you try to load, for example, earth page. Maybe you can fix it by adding netlify.toml file to the root directory of the project with the following code in it:
[[redirects]] from = "/*" to = "/" status = 200
Maybe it'll solve it, I usually use this for rendering custom 404 page when the project deployed to netlify.
- Also Overview/Internal Structure/Surface Geology buttons don't work the way you intended I guess
Keep it up! And good luck π
Marked as helpful0@Nutopia13Posted about 2 years ago@JaneMoroz Thank you. Just optimized images, they have to load now. About netlify.toml, still trying to connect it :(
1@Nutopia13Posted about 2 years ago@Nutopia13 All done. Has to work now. Still trying to think about how to add color for each button in the Overview/Surface section.
1@JaneMorozPosted about 2 years ago@Nutopia13 Cool, everything works!
About buttons color, maybe you can use a state variable with useState responsible for active button and then connect it to some css class responsible for "active" button state color. You already have:
const [content, setContent] = useState("overview");
So if you pass it to Buttons component as prop, you can then use it, for example:
<button className={`btn1 btn ...rest ${content === "overview" && "active"}`} onClick={props.onClick} id={props.id.name}> <span>01</span> <span>Overview</span> </button>
It's just the first thing that came to mind π€
Marked as helpful0 - @Fahadnawaz007Posted about 2 years ago
I liked your project but planets images are not available and there is no way of going back to home page.
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord