forked from ddrilling/asb_cloud_front
Код LayoutPortal сокоращён и дополнен
This commit is contained in:
parent
f79c96f3c0
commit
1bd13aab97
@ -1,20 +1,13 @@
|
|||||||
import {Layout} from 'antd'
|
import {Layout} from 'antd'
|
||||||
import PageHeader from './PageHeader'
|
import PageHeader from './PageHeader'
|
||||||
|
|
||||||
const {Content} = Layout
|
export const LayoutPortal = ({title, noSheet, ...props}) => (
|
||||||
|
<Layout.Content>
|
||||||
export default function LayoutPortal({title, noSheet, children}) {
|
|
||||||
const content = noSheet
|
|
||||||
? <Layout>{children}</Layout>
|
|
||||||
: <Layout>
|
|
||||||
<Content className="site-layout-background sheet">
|
|
||||||
{children}
|
|
||||||
</Content>
|
|
||||||
</Layout>
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Content>
|
|
||||||
<PageHeader title={title}/>
|
<PageHeader title={title}/>
|
||||||
{content}
|
<Layout>
|
||||||
</Content>)
|
{noSheet ? props.children : (
|
||||||
}
|
<Layout.Content className={'site-layout-background sheet'} {...props}/>
|
||||||
|
)}
|
||||||
|
</Layout>
|
||||||
|
</Layout.Content>
|
||||||
|
)
|
||||||
|
@ -2,7 +2,7 @@ import { Redirect, Route, Switch } from "react-router-dom";
|
|||||||
import Deposit from "./Deposit";
|
import Deposit from "./Deposit";
|
||||||
import Cluster from "./Cluster";
|
import Cluster from "./Cluster";
|
||||||
import Well from "./Well";
|
import Well from "./Well";
|
||||||
import LayoutPortal from "../components/LayoutPortal";
|
import {LayoutPortal} from "../components/LayoutPortal";
|
||||||
|
|
||||||
export default function Main() {
|
export default function Main() {
|
||||||
return (
|
return (
|
||||||
|
Loading…
Reference in New Issue
Block a user