mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-01-06 08:49:53 -06:00
properly fall back to tenant switcher (#2307)
This commit is contained in:
@@ -64,7 +64,7 @@ interface SidebarProps extends React.HTMLAttributes<HTMLDivElement> {
|
||||
function Sidebar({ className, memberships, currTenant }: SidebarProps) {
|
||||
const { sidebarOpen, setSidebarOpen } = useSidebar();
|
||||
|
||||
const { data: cloudMeta } = useCloudApiMeta();
|
||||
const { data: cloudMeta, isCloudEnabled } = useCloudApiMeta();
|
||||
const featureFlags = useCloudFeatureFlags(currTenant.metadata.id);
|
||||
|
||||
const onNavLinkClick = useCallback(() => {
|
||||
@@ -248,7 +248,7 @@ function Sidebar({ className, memberships, currTenant }: SidebarProps) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{cloudMeta ? (
|
||||
{isCloudEnabled ? (
|
||||
<OrganizationSelector memberships={memberships} />
|
||||
) : (
|
||||
<TenantSwitcher memberships={memberships} currTenant={currTenant} />
|
||||
|
||||
@@ -69,7 +69,7 @@ function Sidebar({ className, memberships }: SidebarProps) {
|
||||
const { sidebarOpen, setSidebarOpen } = useSidebar();
|
||||
const { tenantId } = useCurrentTenantId();
|
||||
|
||||
const { data: cloudMeta } = useCloudApiMeta();
|
||||
const { data: cloudMeta, isCloudEnabled } = useCloudApiMeta();
|
||||
const featureFlags = useCloudFeatureFlags(tenantId);
|
||||
|
||||
const onNavLinkClick = useCallback(() => {
|
||||
@@ -267,7 +267,7 @@ function Sidebar({ className, memberships }: SidebarProps) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{cloudMeta ? (
|
||||
{isCloudEnabled ? (
|
||||
<OrganizationSelector memberships={memberships} />
|
||||
) : (
|
||||
<TenantSwitcher memberships={memberships} />
|
||||
|
||||
Reference in New Issue
Block a user