mirror of
https://github.com/ragestudio/relic.git
synced 2025-06-09 02:24:18 +00:00
added layout
This commit is contained in:
parent
75ed9468f9
commit
367a0faa69
28
src/renderer/src/layout/index.jsx
Normal file
28
src/renderer/src/layout/index.jsx
Normal file
@ -0,0 +1,28 @@
|
||||
import React from "react"
|
||||
import * as antd from "antd"
|
||||
|
||||
import AppHeader from "./components/Header"
|
||||
|
||||
const Layout = (props) => {
|
||||
const [api, contextHolder] = antd.notification.useNotification({
|
||||
stack: {
|
||||
threshold: 1
|
||||
}
|
||||
})
|
||||
|
||||
React.useEffect(() => {
|
||||
app.notification = api
|
||||
}, [])
|
||||
|
||||
return <antd.Layout className="app_layout">
|
||||
{contextHolder}
|
||||
|
||||
<AppHeader />
|
||||
|
||||
<antd.Layout.Content className="app_content">
|
||||
{props.children}
|
||||
</antd.Layout.Content>
|
||||
</antd.Layout>
|
||||
}
|
||||
|
||||
export default Layout
|
Loading…
x
Reference in New Issue
Block a user