Skip to content

Commit

Permalink
Improve the styling of search initialization errors.
Browse files Browse the repository at this point in the history
Signed-off-by: Kalle Struik <kalle@kallestruik.nl>
  • Loading branch information
KalleStruik committed Oct 3, 2021
1 parent 9f26c1c commit 0e5a036
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions src/components/views/elements/DesktopBuildsNotice.tsx
Expand Up @@ -36,20 +36,23 @@ export default function DesktopBuildsNotice({ isRoomEncrypted, kind }: IProps) {
if (!isRoomEncrypted) return null;
if (EventIndexPeg.get()) return null;

if (EventIndexPeg.error) {
return <>
{ _t("Message search initialisation failed, check <a>your settings</a> for more information", {}, {
a: sub => (<a onClick={(evt) => {
evt.preventDefault();
dis.dispatch({
action: Action.ViewUserSettings,
initialTabId: UserTab.Security,
});
}}>
{ sub }
</a>),
}) }
</>;
if (true) {
return (
<div className="mx_DesktopBuildsNotice">
{ _t("Message search initialisation failed, check <a>your settings</a> for more information", {}, {
a: sub => (<a className="mx_linkButton"
onClick={(evt) => {
evt.preventDefault();
dis.dispatch({
action: Action.ViewUserSettings,
initialTabId: UserTab.Security,
});
}}>
{ sub }
</a>),
}) }
</div>
);
}

const { desktopBuilds, brand } = SdkConfig.get();
Expand Down

0 comments on commit 0e5a036

Please sign in to comment.