Cannot compile nextjs #14356
Answered
by
IamLizu
bhumijgupta
asked this question in
Help
Cannot compile nextjs
#14356
-
I am trying to compile two files:-
import Layout from "../components/Layout";
let Home = () => (
<Layout>
<h1>Hello</h1>
</Layout>
);
export default Home;
import Head from "next/head";
let Layout = ({ children, title = "Oneshot.ai" }) => (
<Layout>
<Head>
<title>{title}</title>
</Head>
{children}
</Layout>
);
export default Layout; When I try to run
|
Beta Was this translation helpful? Give feedback.
Answered by
IamLizu
Jun 19, 2020
Replies: 1 comment 1 reply
-
In your layout component, you are using itself, which you shouldn't. Try replacing your layout component with this,
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
bhumijgupta
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In your layout component, you are using itself, which you shouldn't. Try replacing your layout component with this,