Skip to content

Commit af7645e

Browse files
committed
fix: BF banner showing up for users with existing plan
1 parent 1360216 commit af7645e

File tree

1 file changed

+9
-3
lines changed
  • assets/src/dashboard/parts/connected

1 file changed

+9
-3
lines changed

assets/src/dashboard/parts/connected/index.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,23 @@ const ConnectedLayout = ({
6565
hasApplication,
6666
hasConflicts,
6767
siteSettings,
68-
extraVisits
68+
extraVisits,
69+
plan
6970
} = useSelect( select => {
7071
const {
7172
isConnected,
7273
hasApplication,
7374
getConflicts,
74-
getSiteSettings
75+
getSiteSettings,
76+
getUserData
7577
} = select( 'optimole' );
7678

7779
const conflicts = getConflicts();
7880
const siteSettings = getSiteSettings();
81+
const user = getUserData();
7982

8083
return {
84+
plan: user?.plan,
8185
isConnected: isConnected(),
8286
hasApplication: hasApplication(),
8387
hasConflicts: 0 < conflicts.count || 0,
@@ -144,9 +148,11 @@ const ConnectedLayout = ({
144148
}
145149
}, [ canSave ]);
146150

151+
const showBFBanner = 'free' === plan && optimoleDashboardApp?.bf_notices?.banner;
152+
147153
return (
148154
<div className="optml-connected 2xl:max-w-screen-xl max-w-screen px-4 mx-auto">
149-
{optimoleDashboardApp?.bf_notices?.banner && <BlackFridayBanner/>}
155+
{showBFBanner && <BlackFridayBanner/>}
150156

151157
<div className="flex flex-col xl:flex-row mx-auto gap-5">
152158
<div

0 commit comments

Comments
 (0)