1
I have a component called Header
and wish to reuse it in a few more pages. When I do the import Header from './Header'
and call him on the page desired, it’s all right.
What I wish is to bring the component without the Button
to the new page. How can I do this?
Parent component:
const PageDefault = () => {
return <Header />;
};
export default PageDefault;
Component Header
:
const Header = () => {
return (
<nav className="Header">
<Link to="/">
<img className="Sena" src={Sena} alt="sena imagem" />
</Link>
<Button as={Link} className="Button" to="/sena/bel">
Registrar
</Button>
</nav>
);
};
export default Header;
Oops!!! Thank you!! That’s just what I needed! Be able to solve here. Thank you!!!
– Sena Oliveira