mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
18 lines
376 B
JavaScript
18 lines
376 B
JavaScript
import { use } from 'react'
|
|
import { fetchCategories } from './getCategories'
|
|
import React from 'react'
|
|
import CategoryNav from './CategoryNav'
|
|
|
|
export default function Layout({ children }) {
|
|
const categories = use(fetchCategories())
|
|
return (
|
|
<div>
|
|
<div>
|
|
<CategoryNav categories={categories} />
|
|
</div>
|
|
|
|
<div>{children}</div>
|
|
</div>
|
|
)
|
|
}
|