Skip to content

Commit 53120ca

Browse files
committed
Merge branch 'feat/create-app' of github.com:devtron-labs/devtron-fe-common-lib into feat/graph-visualizer
2 parents a891176 + 57e55a2 commit 53120ca

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

src/Shared/Components/ModalSidebarPanel/ModalSidebarPanel.component.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@ const ModalSidebarPanel = ({
2626
}: ModalSidebarPanelProps) => (
2727
<div className={`flexbox-col w-250 dc__gap-24 dc__modal-gradient ${rootClassName}`}>
2828
<div className="flexbox-col dc__gap-12">
29-
<div className="flexbox-col dc__gap-4">
30-
{icon && icon}
31-
<h3 className="fs-18 fw-6 cn-9 lh-1-5 m-0">{heading}</h3>
32-
</div>
29+
{(icon || heading) && (
30+
<div className="flexbox-col dc__gap-4">
31+
{icon && icon}
32+
{heading && <h3 className="fs-18 fw-6 cn-9 lh-1-5 m-0">{heading}</h3>}
33+
</div>
34+
)}
3335
{children && <div className="fs-13 fw-4 lh-1-5 cn-7">{children}</div>}
3436
</div>
3537
<div className="flexbox-col dc__gap-4">

src/Shared/Components/ModalSidebarPanel/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { ReactNode } from 'react'
1818

1919
export interface ModalSidebarPanelProps {
2020
rootClassName?: string
21-
heading: string
21+
heading: string | null
2222
icon?: JSX.Element
2323
children?: ReactNode
2424
documentationLink: string

src/Shared/Hooks/useGetResourceKindsOptions/useGetResourceKindsOptions.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ const useGetResourceKindsOptions = ({
5050
resourcesToFetchMap[ResourceKindType.cluster] ? getClusterOptions() : null,
5151
resourcesToFetchMap[ResourceKindType.environment] ? getEnvironmentOptionsGroupedByClusters() : null,
5252
]),
53-
[resourcesToFetchMap],
53+
// Using string to prevent re-renders since it is a array of string
54+
[`${resourcesToFetchMap}`],
5455
resourcesToFetch.length > 0,
5556
)
5657

src/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ export interface customEnv {
105105
* @default false
106106
*/
107107
FEATURE_EXPERIMENTAL_THEMING_ENABLE?: boolean
108+
/**
109+
* If true, the application templates feature is enabled
110+
*
111+
* @default false
112+
*/
113+
FEATURE_APPLICATION_TEMPLATES_ENABLE?: boolean
108114
}
109115
declare global {
110116
interface Window {

0 commit comments

Comments
 (0)