Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/smart-singers-open.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": patch
---

Show last used bagde only if there are more than one login method
4 changes: 3 additions & 1 deletion src/auth/components/LoginPage/LoginPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ const LoginPage: React.FC<LoginCardProps> = props => {
const intl = useIntl();
const [showPassword, setShowPassword] = useState(false);
const [optimisticLoaderAuthId, setOptimisticLoaderAuthId] = useState<null | string>(null);
const showLastLoginIndicatorForPassword =
lastLoginMethod === "password" && externalAuthentications.length > 0;

return (
<LoginForm onSubmit={onSubmit}>
Expand Down Expand Up @@ -124,7 +126,7 @@ const LoginPage: React.FC<LoginCardProps> = props => {
data-test-id="submit"
position="relative"
>
{lastLoginMethod === "password" && <LastLoginIndicator />}
{showLastLoginIndicatorForPassword && <LastLoginIndicator />}
<FormattedMessage id="AubJ/S" defaultMessage="Sign in" description="button" />
</ButtonWithLoader>
</div>
Expand Down
Loading