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 PageHeader from './PageHeader'
|
||||
|
||||
const {Content} = Layout
|
||||
|
||||
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>
|
||||
export const LayoutPortal = ({title, noSheet, ...props}) => (
|
||||
<Layout.Content>
|
||||
<PageHeader title={title}/>
|
||||
{content}
|
||||
</Content>)
|
||||
}
|
||||
<Layout>
|
||||
{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 Cluster from "./Cluster";
|
||||
import Well from "./Well";
|
||||
import LayoutPortal from "../components/LayoutPortal";
|
||||
import {LayoutPortal} from "../components/LayoutPortal";
|
||||
|
||||
export default function Main() {
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user