@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
@Nutopia13
Posted
@JaneMoroz Thank you. Just optimized images, they have to load now. About netlify.toml, still trying to connect it :(
@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.
@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