Skip to content

Commit cb09aa6

Browse files
committed
Hides welcome overlay for paid users
(#4769, #4773, PLG-138)
1 parent bf5b838 commit cb09aa6

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/webviews/apps/home/components/welcome-overlay.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { consume } from '@lit/context';
22
import { css, html, LitElement, nothing } from 'lit';
33
import { customElement, property, state } from 'lit/decorators.js';
4+
import { isSubscriptionTrialOrPaidFromState } from '../../../../plus/gk/utils/subscription.utils';
45
import type { State } from '../../../home/protocol';
56
import { CollapseSectionCommand } from '../../../home/protocol';
67
import { ipcContext } from '../../shared/contexts/ipc';
@@ -77,8 +78,14 @@ export class GlWelcomeOverlay extends LitElement {
7778
private closed = false;
7879

7980
override render(): unknown {
80-
const { welcomeOverlayCollapsed, walkthroughSupported, newInstall } = this._state;
81-
if (this.closed || welcomeOverlayCollapsed || walkthroughSupported || !newInstall) {
81+
const { welcomeOverlayCollapsed, walkthroughSupported, newInstall, subscription } = this._state;
82+
if (
83+
this.closed ||
84+
welcomeOverlayCollapsed ||
85+
walkthroughSupported ||
86+
!newInstall ||
87+
isSubscriptionTrialOrPaidFromState(subscription.state)
88+
) {
8289
return nothing;
8390
}
8491

0 commit comments

Comments
 (0)