-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ragudesign
committed
Jun 16, 2022
1 parent
6fe6cdb
commit 0546f2d
Showing
6 changed files
with
20 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,26 @@ | ||
import Header from '../components/header/Header' | ||
import Header from '../components/header/Header'; | ||
import NextNprogress from 'nextjs-progressbar'; | ||
import fetcher from '../lib/fetcher'; | ||
import '../styles/base/base.scss' | ||
import '../styles/base/gutenberg.scss' | ||
import { getCats } from '../lib/api'; | ||
import '../styles/base/base.scss'; | ||
import '../styles/base/gutenberg.scss'; | ||
|
||
function MyApp({ Component, pageProps, kbCats }) { | ||
|
||
return ( | ||
<> | ||
<NextNprogress color="#0770ef" /> | ||
<Header kbCats={kbCats} /> | ||
<Header menu={kbCats} /> | ||
<Component {...pageProps} /> | ||
</> | ||
) | ||
); | ||
} | ||
|
||
export default MyApp | ||
|
||
|
||
export async function getStaticProps() { | ||
MyApp.getInitialProps = async () => { | ||
const response = await fetcher(getCats); | ||
|
||
const kbCats = response.data.kbsTax.nodes; | ||
const kbCats = response.data?.kbsTax.nodes; | ||
|
||
return { | ||
props: { | ||
kbCats, | ||
}, | ||
return { kbCats }; | ||
}; | ||
} | ||
|
||
export default MyApp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters