Skip to content

Commit

Permalink
fix mas banner showing on web
Browse files Browse the repository at this point in the history
Changelog: fixed
  • Loading branch information
antonbuks committed Feb 22, 2024
1 parent aa4323a commit c586fa0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {FormattedMessage} from 'react-intl';
import ExternalLink from 'components/external_link';

import {AnnouncementBarTypes} from 'utils/constants';
import {isMacMas} from 'utils/user_agent';
import {isNotMacMas} from 'utils/user_agent';

import informationIcon from 'images/icons/information-blue.svg';

Expand All @@ -21,7 +21,7 @@ export default class MASMigrationBar extends React.PureComponent <Props> {
render() {
const {showMASBanner} = this.props;

if (showMASBanner && !isMacMas()) {
if (showMASBanner && !isNotMacMas()) {
return (
<AnnouncementBar
type={AnnouncementBarTypes.INFOMANIAK_ADVISOR}
Expand Down
4 changes: 2 additions & 2 deletions webapp/channels/src/utils/user_agent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ export function isMacApp(): boolean {
return isDesktopApp() && isMac();
}

export function isMacMas(): boolean {
return isMacApp() && userAgent().indexOf('Mas') !== -1;
export function isNotMacMas(): boolean {
return isMacApp() && userAgent().indexOf('Mas') === -1;
}

export function isWindows(): boolean {
Expand Down

0 comments on commit c586fa0

Please sign in to comment.