Skip to content

Commit 58be61e

Browse files
fixed auth view when branding is not avialable
1 parent 8332a99 commit 58be61e

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

client/packages/lowcoder/src/pages/userAuth/authComponents.tsx

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { Col, Row, Typography } from "antd";
1111
import { getBrandingSetting } from "@lowcoder-ee/redux/selectors/enterpriseSelectors";
1212
import { useSelector } from "react-redux";
1313
import { buildMaterialPreviewURL } from "@lowcoder-ee/util/materialUtils";
14+
import { isEmpty } from "lodash";
1415

1516
const StyledBrandingColumn = styled(Col)<{$bgImage?: string | null}>`
1617
background-color: rgb(234, 234, 234);
@@ -223,32 +224,38 @@ export const AuthContainer = (props: {
223224
isEE?: boolean;
224225
orgId?: string;
225226
}) => {
227+
const brandingSettings = useSelector(getBrandingSetting);
228+
229+
const showEEBranding = useMemo(() => {
230+
return props.isEE && !isEmpty(brandingSettings);
231+
}, [props.isEE, brandingSettings]);
232+
226233
return (
227-
<AuthCardContainer $isEE={props.isEE}>
228-
{!props.isEE && (
234+
<AuthCardContainer $isEE={showEEBranding}>
235+
{!showEEBranding && (
229236
<AuthCardHeading
230237
$type={props.type}
231-
$isEE={props.isEE}
238+
$isEE={showEEBranding}
232239
>
233240
{props.heading || ""}
234241
</AuthCardHeading>
235242
)}
236-
<AuthCard $isEE={props.isEE}>
243+
<AuthCard $isEE={showEEBranding}>
237244
<BrandingWrapper
238-
isEE={props.isEE}
245+
isEE={showEEBranding}
239246
>
240-
{props.isEE && (
247+
{showEEBranding && (
241248
<AuthCardHeading
242249
$type={props.type}
243-
$isEE={props.isEE}
250+
$isEE={showEEBranding}
244251
>
245252
{props.heading || ""}
246253
</AuthCardHeading>
247254
)}
248255
{props.children}
249256
</BrandingWrapper>
250257
</AuthCard>
251-
{ props.subHeading && !props.isEE && (
258+
{ props.subHeading && !showEEBranding && (
252259
<AuthCardSubFooter>
253260
<img src={favicon} alt={"Lowcoder | " + trans("productDesc")} width="20px"/>
254261
<a href="https://lowcoder.cloud" target="_blank" rel="noreferrer">

0 commit comments

Comments
 (0)