mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-14 14:55:58 +08:00
fix: added billing page condition to not show when its not either cloud or enterprise (#4827)
This commit is contained in:
parent
31c0b94ae6
commit
e9bb05cc5d
@ -147,7 +147,11 @@ function App(): JSX.Element {
|
||||
}
|
||||
}
|
||||
|
||||
if (isOnBasicPlan || (isLoggedInState && role && role !== 'ADMIN')) {
|
||||
if (
|
||||
isOnBasicPlan ||
|
||||
(isLoggedInState && role && role !== 'ADMIN') ||
|
||||
!(isCloudUserVal || isEECloudUser())
|
||||
) {
|
||||
const newRoutes = routes.filter((route) => route?.path !== ROUTES.BILLING);
|
||||
setRoutes(newRoutes);
|
||||
}
|
||||
|
@ -96,6 +96,8 @@ function SideNav({
|
||||
|
||||
const { registerShortcut, deregisterShortcut } = useKeyboardHotkeys();
|
||||
|
||||
const isCloudUserVal = isCloudUser();
|
||||
|
||||
useEffect(() => {
|
||||
if (inviteMembers) {
|
||||
const updatedUserManagementMenuItems = [
|
||||
@ -135,7 +137,11 @@ function SideNav({
|
||||
license.isCurrent && license.planKey === LICENSE_PLAN_KEY.BASIC_PLAN,
|
||||
) || licenseData?.payload?.licenses === null;
|
||||
|
||||
if (role !== USER_ROLES.ADMIN || isOnBasicPlan) {
|
||||
if (
|
||||
role !== USER_ROLES.ADMIN ||
|
||||
isOnBasicPlan ||
|
||||
!(isCloudUserVal || isEECloudUser())
|
||||
) {
|
||||
items = items.filter((item) => item.key !== ROUTES.BILLING);
|
||||
}
|
||||
|
||||
@ -214,8 +220,6 @@ function SideNav({
|
||||
pathname,
|
||||
]);
|
||||
|
||||
const isCloudUserVal = isCloudUser();
|
||||
|
||||
useEffect(() => {
|
||||
if (isCloudUser() || isEECloudUser()) {
|
||||
const updatedUserManagementMenuItems = [helpSupportMenuItem];
|
||||
|
Loading…
x
Reference in New Issue
Block a user