Skip to content

unable to fetch data in nextjs headless WordPress #60

Description

@SanjayGitHub00

This is my header component --
`
import { isEmpty } from "lodash";
import Nav from "./Nav";

const Header = ({ headerMenus }) => {
// console.log(headerMenus); <- Here i get the menus
if (isEmpty(headerMenus)) {
return null;
}
return (
//<Header> // <Nav headerMenus = {headerMenus}/> // </Header>
);
};
export default Header;
`
when I send data through props to nav I am not getting any data in nav component please help here the code of Nav

`
const Nav = ({headerMenus}) =>{
// console.log(headerMenus); <~~ Not getting data here so i can't return anything through this

return;
};
export default Nav;
`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions