Commit 9de61e99 by Vijay G

feat: header update

parent 04ac208e
'use client';
import Header from "@components/base/header";
import { useAppContext } from "@context/index";
export default function PageHeader() {
const { theme, setTheme } = useAppContext();
return(
<Header name="NewsBlog" currentTheme={theme} onThemeChange={setTheme} />
)
}
\ No newline at end of file
import ThemeProvider from "./context";
import ThemeProvider from "@context/index";
import "./globals.css";
export default function RootLayout({ children }) {
export default function RootLayout({ children, header }) {
return (
<ThemeProvider>
<html lang="en">
<body>{children}</body>
{console.log("header", header)}
<body>
{header}
{children}
</body>
</html>
</ThemeProvider>
);
......
import BlogLists from "@components/top-level/blog-lists";
import Header from "@components/base/header";
import { getAllPosts } from "@lib/posts";
import { useAppContext } from "./context";
const Home = () => {
const { theme, setTheme } = useAppContext();
let blogs;
const fetchAllBlogs = () => {
......@@ -14,7 +12,6 @@ const Home = () => {
return (
<div>
<Header name="NewsBlog" currentTheme={theme} onThemeChange={setTheme} />
<BlogLists
title={blogs?.title}
description={blogs?.description}
......
......@@ -5,7 +5,7 @@
"@components/*": ["components/*"],
"@img/*": ["public/images/*"],
"@posts/*": ["posts/*"],
"@context/*": ["app/context/*"],
"@context/*": ["context/*"],
"@lib/*": ["lib/*"]
},
"experimentalDecorators": true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment