Skip to content

Commit

Permalink
fix(layout): remove ProLayout defaultProps
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed Mar 26, 2023
1 parent 5927f55 commit 7d1891f
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions packages/layout/src/ProLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -718,12 +718,6 @@ const BaseProLayout: React.FC<ProLayoutProps> = (props) => {
);
};

BaseProLayout.defaultProps = {
logo: <Logo />,
...defaultSettings,
location: isBrowser() ? window.location : undefined,
};

const ProLayout: React.FC<ProLayoutProps> = (props) => {
const { colorPrimary } = props;

Expand Down Expand Up @@ -752,7 +746,12 @@ const ProLayout: React.FC<ProLayoutProps> = (props) => {
token={props.token}
prefixCls={props.prefixCls}
>
<BaseProLayout {...props} />
<BaseProLayout
logo={<Logo />}
{...defaultSettings}
location={isBrowser() ? window.location : undefined}
{...props}
/>
</ProConfigProvider>
</ConfigProvider>
);
Expand Down

0 comments on commit 7d1891f

Please sign in to comment.