Skip to content

Commit

Permalink
Fix context error in /doc (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
devXprite authored Oct 6, 2023
1 parent 0059335 commit ceb0fad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 0 additions & 3 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,17 @@ import Error from "./components/Error/Error";
import SearchInput from "./components/Search/SearchInput";
import Layout from "./components/Layout/Layout";
import BGShape from "./components/BGShape";
import { ThemeProvider } from "./context/ThemeContext";

function App() {
const [search, setSearch] = useState("");
const [type, setType] = useState("");

return (
<>
<ThemeProvider>
<Layout>
<SearchInput search={search} setSearch={setSearch} setType={setType} />
<Error search={search} type={type} />
</Layout>
</ThemeProvider>
</>
);
}
Expand Down
5 changes: 3 additions & 2 deletions src/components/Layout/Layout.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import Header from '../Header/Header';
import Footer from '../Footer/Footer';
import { ThemeProvider } from '../../context/ThemeContext';

/**
* The Layout function is a React component that returns a div with a Header component and the children
Expand All @@ -9,15 +10,15 @@ import Footer from '../Footer/Footer';
*/
const Layout = ({children}) => {
return (
<>
<ThemeProvider>
<Header
notice={"Under Construction"}
/>
<div className='relative'>
{children}
</div>
<Footer />
</>
</ThemeProvider>
);
};

Expand Down

1 comment on commit ceb0fad

@vercel
Copy link

@vercel vercel bot commented on ceb0fad Oct 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.