Add delay for 30 days in production status offf

This commit is contained in:
lalitdeore12@gmail.com
2025-12-15 12:46:41 +05:30
parent b2f1c887de
commit 87aa510b67
2 changed files with 21 additions and 2 deletions
+15 -1
View File
@@ -84,6 +84,7 @@ const LeftSideBar = ({ userdata, serverside, globalUrl, notifications, }) => {
const tab = params.get("tab");
const currentPath = tab ? `${window.location.pathname}?tab=${tab}` : window.location.pathname;
const [hoverOnAvatar, setHoverOnAvatar] = useState(false);
const [showProductionStatus, setShowProductionStatus] = useState(false);
const [orgOptions, setOrgOptions] = useState(
userdata?.orgs?.map((org) => ({
id: org.id,
@@ -127,6 +128,19 @@ const LeftSideBar = ({ userdata, serverside, globalUrl, notifications, }) => {
setCurrentSelectedTheme(userdata?.theme);
}
}, [userdata]);
useEffect(() => {
if (activeOrgData?.id?.length > 0 && typeof activeOrgData.created === "number") {
const nowUnix = Math.floor(Date.now() / 1000);
const THIRTY_DAYS = 30 * 24 * 60 * 60;
const isAfter30Days = nowUnix >= activeOrgData.created + THIRTY_DAYS;
setShowProductionStatus(isAfter30Days);
}
}, [activeOrgData]);
const CustomPopper = (props) => {
return (
@@ -1949,7 +1963,7 @@ const LeftSideBar = ({ userdata, serverside, globalUrl, notifications, }) => {
</div>
}
{!isCloud ? (
{!isCloud && showProductionStatus? (
<div
style={{
display: "flex",