mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-08 13:05:08 +09:00
fix if statement
This commit is contained in:
1 parent
193f7521a7
commit
c335bdafd2
1 file changed
+5
-4
@@ -15,16 +15,17 @@ export const LoginButton = ({
|
||||
onClick?: () => void;
|
||||
enabled: boolean;
|
||||
}) => {
|
||||
const showTooltip =
|
||||
(isPreviewEnvironment || enabled === false) && isDevLogin === false;
|
||||
const isSocialLoginInPreviewEnvironment =
|
||||
isPreviewEnvironment && isDevLogin === false;
|
||||
const showTooltip = isSocialLoginInPreviewEnvironment || enabled === false;
|
||||
if (showTooltip) {
|
||||
const content = isPreviewEnvironment
|
||||
const content = isSocialLoginInPreviewEnvironment
|
||||
? "Social login does not work in preview deployments"
|
||||
: "This login is not configured";
|
||||
|
||||
return (
|
||||
<Tooltip content={content} delayDuration={0}>
|
||||
<span tabIndex={0}>
|
||||
<span tabIndex={0} style={{ width: "100%" }}>
|
||||
<Button
|
||||
{...props}
|
||||
css={{ width: "100%" }}
|
||||
|
||||
Reference in new issue
Block a user