mirror of
https://github.com/aykhans/slash-e.git
synced 2025-07-03 12:17:55 +00:00
chore: tweak feature matrix
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { Tooltip } from "@mui/joy";
|
||||
import { FeatureType, checkFeatureAvailable } from "@/helpers/feature";
|
||||
import { useWorkspaceStore } from "@/stores";
|
||||
import { FeatureType } from "@/stores/workspace";
|
||||
import Icon from "./Icon";
|
||||
|
||||
interface Props {
|
||||
@ -10,7 +10,7 @@ interface Props {
|
||||
|
||||
const FeatureBadge = ({ feature, className }: Props) => {
|
||||
const workspaceStore = useWorkspaceStore();
|
||||
const isFeatureEnabled = checkFeatureAvailable(feature, workspaceStore.profile.plan);
|
||||
const isFeatureEnabled = workspaceStore.checkFeatureAvailable(feature);
|
||||
|
||||
if (isFeatureEnabled) {
|
||||
return null;
|
||||
|
@ -3,8 +3,8 @@ import { useEffect, useState } from "react";
|
||||
import toast from "react-hot-toast";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { workspaceServiceClient } from "@/grpcweb";
|
||||
import { checkFeatureAvailable, FeatureType } from "@/helpers/feature";
|
||||
import { useWorkspaceStore } from "@/stores";
|
||||
import { FeatureType } from "@/stores/workspace";
|
||||
import { IdentityProvider } from "@/types/proto/api/v1/workspace_service";
|
||||
import CreateIdentityProviderDrawer from "../CreateIdentityProviderDrawer";
|
||||
import FeatureBadge from "../FeatureBadge";
|
||||
@ -21,7 +21,7 @@ const SSOSection = () => {
|
||||
const workspaceStore = useWorkspaceStore();
|
||||
const [identityProviderList, setIdentityProviderList] = useState<IdentityProvider[]>([]);
|
||||
const [editState, setEditState] = useState<EditState>({ open: false, identityProvider: undefined });
|
||||
const isSSOFeatureEnabled = checkFeatureAvailable(FeatureType.SSO, workspaceStore.profile.plan);
|
||||
const isSSOFeatureEnabled = workspaceStore.checkFeatureAvailable(FeatureType.SSO);
|
||||
|
||||
useEffect(() => {
|
||||
fetchIdentityProviderList();
|
||||
|
@ -4,8 +4,8 @@ import { useRef, useState } from "react";
|
||||
import toast from "react-hot-toast";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { workspaceServiceClient } from "@/grpcweb";
|
||||
import { FeatureType } from "@/helpers/feature";
|
||||
import { useWorkspaceStore } from "@/stores";
|
||||
import { FeatureType } from "@/stores/workspace";
|
||||
import { Visibility } from "@/types/proto/api/v1/common";
|
||||
import { PlanType } from "@/types/proto/api/v1/subscription_service";
|
||||
import { WorkspaceSetting } from "@/types/proto/api/v1/workspace_service";
|
||||
|
Reference in New Issue
Block a user