Add 30 day delay for production status off

This commit is contained in:
lalitdeore12@gmail.com
2025-12-15 19:04:28 +05:30
parent 87aa510b67
commit 1d61d84453
2 changed files with 4 additions and 19 deletions
+1 -13
View File
@@ -84,7 +84,6 @@ 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,
@@ -129,17 +128,6 @@ const LeftSideBar = ({ userdata, serverside, globalUrl, notifications, }) => {
}
}, [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) => {
@@ -1963,7 +1951,7 @@ const LeftSideBar = ({ userdata, serverside, globalUrl, notifications, }) => {
</div>
}
{!isCloud && showProductionStatus? (
{!isCloud && activeOrgData?.old_org? (
<div
style={{
display: "flex",