diff --git a/frontend/src/components/v2/UpgradeOverlay/UpgradeOverlay.tsx b/frontend/src/components/v2/UpgradeOverlay/UpgradeOverlay.tsx index 7dd1f5afa..f6d8d71c7 100644 --- a/frontend/src/components/v2/UpgradeOverlay/UpgradeOverlay.tsx +++ b/frontend/src/components/v2/UpgradeOverlay/UpgradeOverlay.tsx @@ -33,9 +33,7 @@ export const UpgradeOverlay = () => { return null; } - // for non admin this would throw an error - // so no need to render - return !isUpgradeStatusLoading && isUpgrading ? ( // isUpgrading + return !isUpgradeStatusLoading && isUpgrading ? (
diff --git a/frontend/src/components/v2/UpgradeProjectAlert/UpgradeProjectAlert.tsx b/frontend/src/components/v2/UpgradeProjectAlert/UpgradeProjectAlert.tsx index db5eb1179..121f77067 100644 --- a/frontend/src/components/v2/UpgradeProjectAlert/UpgradeProjectAlert.tsx +++ b/frontend/src/components/v2/UpgradeProjectAlert/UpgradeProjectAlert.tsx @@ -2,6 +2,7 @@ import { useCallback, useState } from "react"; import { useRouter } from "next/router"; import { faWarning } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { twMerge } from "tailwind-merge"; import { useNotificationContext } from "@app/components/context/Notifications/NotificationProvider"; import { useProjectPermission } from "@app/context"; @@ -10,6 +11,7 @@ import { Workspace } from "@app/hooks/api/types"; import { ProjectVersion } from "@app/hooks/api/workspace/types"; import { Button } from "../Button"; +import { Tooltip } from "../Tooltip"; export type UpgradeProjectAlertProps = { project: Workspace; @@ -83,20 +85,44 @@ export const UpgradeProjectAlert = ({ project }: UpgradeProjectAlertProps): JSX. projectStatus?.status !== "FAILED"); if (project.version !== ProjectVersion.V1) return null; - if (membership.role !== "admin") return null; return ( -
+
Upgrade your project - Upgrade your project version to continue receiving the latest improvements and patches. + {membership.role === "admin" ? ( +

+ Upgrade your project version to continue receiving the latest improvements and patches. +

+ ) : ( +

+ Please ask a project admin to upgrade the project. +
+ Upgrading the project version is required to continue receiving the latest improvements + and patches. +

+ )} {currentStatus &&

Status: {currentStatus}

}
- + + +
);