Gate settings profile QR code button on having a username

Co-authored-by: yash-signal <yash@signal.org>
This commit is contained in:
automated-signal
2026-03-06 15:15:28 -06:00
committed by GitHub
parent 4344103004
commit 41ffa1c526

View File

@@ -2409,19 +2409,21 @@ export function Preferences({
{i18n('icu:ProfileEditor__open')}
</span>
</button>
<button
type="button"
className="Preferences__profile-chip__qr-icon-button"
aria-label={i18n('icu:ProfileEditor__username-link__open')}
onClick={() => {
setSettingsLocation({
page: SettingsPage.Profile,
state: ProfileEditorPage.UsernameLink,
});
}}
>
<div className="Preferences__profile-chip__qr-icon" />
</button>
{me.username && (
<button
type="button"
className="Preferences__profile-chip__qr-icon-button"
aria-label={i18n('icu:ProfileEditor__username-link__open')}
onClick={() => {
setSettingsLocation({
page: SettingsPage.Profile,
state: ProfileEditorPage.UsernameLink,
});
}}
>
<div className="Preferences__profile-chip__qr-icon" />
</button>
)}
</div>
<button
type="button"