feat: add pro logo in header for paid user

This commit is contained in:
prafull-opensignlabs
2024-04-02 13:09:55 +05:30
parent b36df32b19
commit 8c64a89f08
+7 -1
View File
@@ -13,9 +13,9 @@ const Header = ({ showSidebar }) => {
let applogo = localStorage.getItem("appLogo") || "";
let username = localStorage.getItem("username");
const image = localStorage.getItem("profileImg") || dp;
const [isOpen, setIsOpen] = useState(false);
const [isSubscribe, setIsSubscribe] = useState(true);
const [isPro, setIsPro]= useState(false)
const toggleDropdown = () => {
setIsOpen(!isOpen);
@@ -27,6 +27,7 @@ const Header = ({ showSidebar }) => {
async function checkSubscription() {
if (isEnableSubscription) {
const getIsSubscribe = await checkIsSubscribed();
setIsPro(getIsSubscribe)
setIsSubscribe(getIsSubscribe);
}
}
@@ -105,6 +106,11 @@ const Header = ({ showSidebar }) => {
</button>
</div>
)}
{isPro && (
<div className="w-[35px] h-[35px] rounded-full ring-[1px] ring-offset-2 ring-[#002862] text-[#002862] overflow-hidden font-semibold flex items-center justify-center">
PRO
</div>
)}
<div>
<FullScreenButton />
</div>