chore: fix feature checks

This commit is contained in:
johnnyjoy
2024-08-17 19:22:25 +08:00
parent a5bc443db9
commit c98e717f5b
7 changed files with 16 additions and 15 deletions

View File

@ -1,6 +1,6 @@
import classNames from "classnames";
import { useWorkspaceStore } from "@/stores";
import { PlanType } from "@/types/proto/api/v1/subscription_service";
import { FeatureType } from "@/stores/workspace";
import Icon from "./Icon";
interface Props {
@ -9,7 +9,7 @@ interface Props {
const Logo = ({ className }: Props) => {
const workspaceStore = useWorkspaceStore();
const hasCustomBranding = workspaceStore.profile.subscription?.plan === PlanType.PRO;
const hasCustomBranding = workspaceStore.checkFeatureAvailable(FeatureType.CustomeBranding);
const branding = hasCustomBranding && workspaceStore.setting.branding ? new TextDecoder().decode(workspaceStore.setting.branding) : "";
return (
<div className={classNames("w-8 h-auto dark:text-gray-500 rounded-lg overflow-hidden", className)}>