chore: add database-backed feature flag for sidebar tips section (#26516)
* chore: remove tips section from sidebar Co-Authored-By: amit@cal.com <samit91848@gmail.com> * chore: add feature flag for sidebar tips section Co-Authored-By: amit@cal.com <samit91848@gmail.com> * chore: use database-backed feature flag for sidebar tips section Co-Authored-By: amit@cal.com <samit91848@gmail.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
amit@cal.com <samit91848@gmail.com>
amit@cal.com <samit91848@gmail.com>
amit@cal.com <samit91848@gmail.com>
Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent
2b7c087ac8
commit
a12ab5bb65
@@ -5,6 +5,7 @@ import Link from "next/link";
|
||||
import { usePathname } from "next/navigation";
|
||||
|
||||
import { getBookerBaseUrlSync } from "@calcom/features/ee/organizations/lib/getBookerBaseUrlSync";
|
||||
import { useFlagMap } from "@calcom/features/flags/context/provider";
|
||||
import { IS_VISUAL_REGRESSION_TESTING, ENABLE_PROFILE_SWITCHER } from "@calcom/lib/constants";
|
||||
import { getPlaceholderAvatar } from "@calcom/lib/defaultAvatarImage";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
@@ -56,6 +57,7 @@ export function SideBar({ bannersHeight, user }: SideBarProps) {
|
||||
const pathname = usePathname();
|
||||
const isPlatformPages = pathname?.startsWith("/settings/platform");
|
||||
const isAdmin = session.data?.user.role === UserPermissionRole.ADMIN;
|
||||
const flags = useFlagMap();
|
||||
|
||||
const publicPageUrl = `${getBookerBaseUrlSync(user?.org?.slug ?? null)}/${user?.orgAwareUsername}`;
|
||||
|
||||
@@ -137,9 +139,11 @@ export function SideBar({ bannersHeight, user }: SideBarProps) {
|
||||
|
||||
{!isPlatformPages && (
|
||||
<div className="md:px-2 md:pb-4 lg:p-0">
|
||||
<div className="overflow-hidden">
|
||||
<Tips />
|
||||
</div>
|
||||
{flags["sidebar-tips"] && (
|
||||
<div className="overflow-hidden">
|
||||
<Tips />
|
||||
</div>
|
||||
)}
|
||||
{bottomNavItems.map((item, index) => (
|
||||
<Tooltip side="right" content={t(item.name)} className="lg:hidden" key={item.name}>
|
||||
<ButtonOrLink
|
||||
|
||||
Reference in New Issue
Block a user