فهرست منبع

condition on beta features enabled

Feroze Mohideen 2 سال پیش
والد
کامیت
59ef523824
1فایلهای تغییر یافته به همراه68 افزوده شده و 34 حذف شده
  1. 68 34
      dashboard/src/main/home/app-dashboard/app-view/AppDataContainer.tsx

+ 68 - 34
dashboard/src/main/home/app-dashboard/app-view/AppDataContainer.tsx

@@ -455,40 +455,74 @@ const AppDataContainer: React.FC<AppDataContainerProps> = ({ tabParam }) => {
   const tabs = useMemo(() => {
     const numNotifications = latestClientNotifications.length;
 
-    const base = [
-      {
-        label: `Notifications`,
-        value: "notifications",
-        sibling:
-          numNotifications > 0 ? (
-            <Tag borderColor={"#FFBF00"}>
-              <Link
-                to={tabUrlGenerator({
-                  tab: "notifications",
-                })}
-                color={"#FFBF00"}
-              >
-                <TagIcon src={alert} />
-                <div
-                  style={{
-                    display: "flex",
-                    alignItems: "center",
-                    fontSize: "13px",
-                  }}
-                >
-                  {numNotifications}
-                </div>
-              </Link>
-            </Tag>
-          ) : undefined,
-      },
-      { label: "Activity", value: "activity" },
-      { label: "Status", value: "status" },
-      { label: "Logs", value: "logs" },
-      { label: "Metrics", value: "metrics" },
-      { label: "Services", value: "overview" },
-      { label: "Environment", value: "environment" },
-    ];
+    const base = currentProject?.beta_features_enabled
+      ? [
+          {
+            label: `Notifications`,
+            value: "notifications",
+            sibling:
+              numNotifications > 0 ? (
+                <Tag borderColor={"#FFBF00"}>
+                  <Link
+                    to={tabUrlGenerator({
+                      tab: "notifications",
+                    })}
+                    color={"#FFBF00"}
+                  >
+                    <TagIcon src={alert} />
+                    <div
+                      style={{
+                        display: "flex",
+                        alignItems: "center",
+                        fontSize: "13px",
+                      }}
+                    >
+                      {numNotifications}
+                    </div>
+                  </Link>
+                </Tag>
+              ) : undefined,
+          },
+          { label: "Activity", value: "activity" },
+          { label: "Status", value: "status" },
+          { label: "Logs", value: "logs" },
+          { label: "Metrics", value: "metrics" },
+          { label: "Services", value: "overview" },
+          { label: "Environment", value: "environment" },
+        ]
+      : [
+          {
+            label: `Notifications`,
+            value: "notifications",
+            sibling:
+              numNotifications > 0 ? (
+                <Tag borderColor={"#FFBF00"}>
+                  <Link
+                    to={tabUrlGenerator({
+                      tab: "notifications",
+                    })}
+                    color={"#FFBF00"}
+                  >
+                    <TagIcon src={alert} />
+                    <div
+                      style={{
+                        display: "flex",
+                        alignItems: "center",
+                        fontSize: "13px",
+                      }}
+                    >
+                      {numNotifications}
+                    </div>
+                  </Link>
+                </Tag>
+              ) : undefined,
+          },
+          { label: "Activity", value: "activity" },
+          { label: "Overview", value: "overview" },
+          { label: "Logs", value: "logs" },
+          { label: "Metrics", value: "metrics" },
+          { label: "Environment", value: "environment" },
+        ];
 
     if (deploymentTarget.is_preview) {
       return base;