diff --git a/ui/app/[locale]/AppLayout.tsx b/ui/app/[locale]/AppLayout.tsx index 114492b88..0d04fe332 100644 --- a/ui/app/[locale]/AppLayout.tsx +++ b/ui/app/[locale]/AppLayout.tsx @@ -21,8 +21,7 @@ import { PropsWithChildren, Suspense } from "react"; export function AppLayout({ children, - showLearningLinks, -}: PropsWithChildren<{ showLearningLinks: boolean }>) { +}: PropsWithChildren) { const t = useTranslations(); return ( {/**/} - + diff --git a/ui/app/[locale]/ClusterConnectionDetails.tsx b/ui/app/[locale]/ClusterConnectionDetails.tsx index 1c0718091..c2d934ebe 100644 --- a/ui/app/[locale]/ClusterConnectionDetails.tsx +++ b/ui/app/[locale]/ClusterConnectionDetails.tsx @@ -11,13 +11,13 @@ import { } from "@/libs/patternfly/react-core"; import { Divider, Stack, StackItem } from "@patternfly/react-core"; import { useTranslations } from "next-intl"; +import { isProductizedBuild } from "@/utils/env"; + export async function ClusterConnectionDetails({ clusterId, - showLearningLinks, }: { clusterId: string; - showLearningLinks: boolean; }) { const t = useTranslations(); const data = await getKafkaCluster(clusterId); @@ -103,7 +103,7 @@ export async function ClusterConnectionDetails({ - {showLearningLinks && ( + {isProductizedBuild && ( diff --git a/ui/app/[locale]/ClusterDrawer.tsx b/ui/app/[locale]/ClusterDrawer.tsx index ec36c8869..ef796d8aa 100644 --- a/ui/app/[locale]/ClusterDrawer.tsx +++ b/ui/app/[locale]/ClusterDrawer.tsx @@ -17,9 +17,8 @@ import { useTranslations } from "next-intl"; import { PropsWithChildren, Suspense } from "react"; export function ClusterDrawer({ - children, - showLearningLinks, -}: PropsWithChildren<{ showLearningLinks: boolean }>) { + children +}: PropsWithChildren) { const t = useTranslations(); const { expanded, clusterId, close } = useClusterDrawerContext(); return ( @@ -54,7 +53,6 @@ export function ClusterDrawer({ {clusterId && ( )} @@ -63,12 +61,12 @@ export function ClusterDrawer({ > {children} diff --git a/ui/app/[locale]/kafka/[kafkaId]/topics/(page)/ConnectedTopicsTable.tsx b/ui/app/[locale]/kafka/[kafkaId]/topics/(page)/ConnectedTopicsTable.tsx index bc4952f5d..0e0853406 100644 --- a/ui/app/[locale]/kafka/[kafkaId]/topics/(page)/ConnectedTopicsTable.tsx +++ b/ui/app/[locale]/kafka/[kafkaId]/topics/(page)/ConnectedTopicsTable.tsx @@ -7,7 +7,7 @@ import { TopicsTableColumns, } from "@/components/TopicsTable/TopicsTable"; import { useRouter } from "@/navigation"; -import { isProductizedBuild, isReadonly } from "@/utils/env"; +import { isReadonly } from "@/utils/env"; import { useFilterParams } from "@/utils/useFilterParams"; import { useOptimistic, useTransition } from "react"; @@ -193,7 +193,6 @@ export function ConnectedTopicsTable({ }} includeHidden={includeHidden} isReadOnly={isReadonly} - showLearningLinks={isProductizedBuild} /> ); } diff --git a/ui/app/[locale]/layout.tsx b/ui/app/[locale]/layout.tsx index 8fe99ae4b..29d8a1128 100644 --- a/ui/app/[locale]/layout.tsx +++ b/ui/app/[locale]/layout.tsx @@ -5,7 +5,6 @@ import NextIntlProvider from "@/app/[locale]/NextIntlProvider"; import { SessionRefresher } from "@/app/[locale]/SessionRefresher"; import { authOptions } from "@/utils/authOptions"; -import { isProductizedBuild } from "@/utils/env"; import { getServerSession } from "next-auth"; import { getTranslations } from "next-intl/server"; import { notFound } from "next/navigation"; @@ -31,7 +30,7 @@ export default async function Layout({ children, params: { locale } }: Props) { - + {children} diff --git a/ui/components/TopicsTable/TopicsTable.tsx b/ui/components/TopicsTable/TopicsTable.tsx index 656154a9f..64eae30dc 100644 --- a/ui/components/TopicsTable/TopicsTable.tsx +++ b/ui/components/TopicsTable/TopicsTable.tsx @@ -78,7 +78,6 @@ export type TopicsTableProps = { filterId: string | undefined; filterName: string | undefined; filterStatus: TopicStatus[] | undefined; - showLearningLinks: boolean; onEditTopic: (topic: TopicList) => void; onDeleteTopic: (topic: TopicList) => void; onCreateTopic: () => void; @@ -112,7 +111,6 @@ export function TopicsTable({ onFilterIdChange, onFilterNameChange, onFilterStatusChange, - showLearningLinks, }: TopicsTableProps) { const t = useTranslations("topics"); return ( @@ -127,7 +125,6 @@ export function TopicsTable({ canCreate={isReadOnly === false} createHref={`${baseurl}/create`} onShowHiddenTopics={() => onInternalTopicsChange(true)} - showLearningLinks={showLearningLinks} /> } emptyStateNoResults={ @@ -301,12 +298,12 @@ export function TopicsTable({ actions={ isReadOnly === false ? [ - { - label: t("create_topic"), - onClick: onCreateTopic, - isPrimary: true, - }, - ] + { + label: t("create_topic"), + onClick: onCreateTopic, + isPrimary: true, + }, + ] : undefined } tools={[ diff --git a/ui/components/TopicsTable/components/EmptyStateNoTopics.tsx b/ui/components/TopicsTable/components/EmptyStateNoTopics.tsx index ac4281b6b..2dd0e060f 100644 --- a/ui/components/TopicsTable/components/EmptyStateNoTopics.tsx +++ b/ui/components/TopicsTable/components/EmptyStateNoTopics.tsx @@ -11,17 +11,16 @@ import { } from "@/libs/patternfly/react-core"; import { PlusCircleIcon } from "@/libs/patternfly/react-icons"; import { useTranslations } from "next-intl"; +import { isProductizedBuild } from "@/utils/env" export function EmptyStateNoTopics({ canCreate, createHref, onShowHiddenTopics, - showLearningLinks, }: { canCreate: boolean; createHref: string; onShowHiddenTopics: () => void; - showLearningLinks: boolean; }) { const t = useTranslations(); return ( @@ -45,7 +44,7 @@ export function EmptyStateNoTopics({ {t("EmptyStateNoTopics.show_internal_topics")} - {showLearningLinks && ( + {isProductizedBuild && ( { return true; })(); -export const isProductizedBuild = process.env.PRODUCTIZED_BUILD === "true"; +export const isProductizedBuild = process.env.NEXT_PUBLIC_PRODUCTIZED_BUILD === "true";