Skip to content

Commit b55cd8e

Browse files
author
ndthanhdev
committed
fix layout
1 parent 5d13d0f commit b55cd8e

1 file changed

Lines changed: 9 additions & 11 deletions

File tree

src/layouts/index.tsx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,20 @@ let Layout: React.FC<{
2323
children: React.ReactNode;
2424
pageContext: any;
2525
}> = function Layout(props) {
26-
const { children, pageContext } = props;
26+
let { children, pageContext } = props;
2727

28-
let content = null;
29-
30-
if (pageContext?.layout === "cv") {
31-
content = <CvLayout>{children}</CvLayout>;
32-
}
33-
34-
content = <div>{children}</div>;
35-
36-
return (
28+
children = (
3729
<>
3830
<SEO />
39-
{content}
31+
{children}
4032
</>
4133
);
34+
35+
if (pageContext?.layout === "cv") {
36+
return <CvLayout>{children}</CvLayout>;
37+
}
38+
39+
return <div>{children}</div>;
4240
};
4341

4442
export default Layout;

0 commit comments

Comments
 (0)