Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

The Planets React Router

VladosNinjaβ€’ 180

@Nutopia13

Desktop design screenshot for the Planets fact site coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
3intermediate
View challenge

Design comparison


SolutionDesign

Solution retrospective


Had some problems with React Routers, but in the end everything working proparly

Community feedback

Eugeniaβ€’ 950

@JaneMoroz

Posted

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 helpful

0

VladosNinjaβ€’ 180

@Nutopia13

Posted

@JaneMoroz Thank you. Just optimized images, they have to load now. About netlify.toml, still trying to connect it :(

1
VladosNinjaβ€’ 180

@Nutopia13

Posted

@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
Eugeniaβ€’ 950

@JaneMoroz

Posted

@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 helpful

0
Fahad Nawazβ€’ 20

@Fahadnawaz007

Posted

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 GitHub
Discord logo

Join 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