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}) {
|
<PageHeader title={title}/>
|
||||||
const content = noSheet
|
<Layout>
|
||||||
? <Layout>{children}</Layout>
|
{noSheet ? props.children : (
|
||||||
: <Layout>
|
<Layout.Content className={'site-layout-background sheet'} {...props}/>
|
||||||
<Content className="site-layout-background sheet">
|
)}
|
||||||
{children}
|
</Layout>
|
||||||
</Content>
|
</Layout.Content>
|
||||||
</Layout>
|
)
|
||||||
|
|
||||||
return (
|
|
||||||
<Content>
|
|
||||||
<PageHeader title={title}/>
|
|
||||||
{content}
|
|
||||||
</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