Skip to content

Commit

Permalink
fix(admin): conditional promotion
Browse files Browse the repository at this point in the history
Description
When the pro version is activated the promotion will be removed too.

resolves: Pro teaser removal  #332
  • Loading branch information
satyajittalukder committed Nov 22, 2023
1 parent b64606b commit a7989c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assets/src/components/dashboard/Promotion.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ import React from "react";
import PremiumBox from "./PremiumBox";
import Gaurantee from "./Gaurantee";
const Promotion = () => {
const isPro = !sgsbAdmin?.isPro;
const pricingPath = window.location.hash === "#/dashboard/pricing";
return (
<div className="sgsb-promotion-block">
{!pricingPath && <PremiumBox />}
{(!pricingPath && isPro) && <PremiumBox />}
<Gaurantee />
</div>
);
Expand Down

0 comments on commit a7989c8

Please sign in to comment.