Skip to content

Commit 9a47d56

Browse files
committed
chore: remove unwanted props
Signed-off-by: amitamrutiya <[email protected]>
1 parent 3af7637 commit 9a47d56

File tree

2 files changed

+5
-25
lines changed

2 files changed

+5
-25
lines changed

src/custom/CatalogDesignTable/DesignTableColumnConfig.tsx

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Theme } from '@mui/material';
22
import { MUIDataTableColumn, MUIDataTableMeta } from 'mui-datatables';
33
import { Typography } from '../../base';
44
import { PLAYGROUND_MODES } from '../../constants/constants';
5-
import { ChainIcon, CopyIcon, KanvasIcon, LockIcon, PublicIcon, PublishIcon } from '../../icons';
5+
import { ChainIcon, CopyIcon, KanvasIcon, PublishIcon } from '../../icons';
66
import Download from '../../icons/Download/Download';
77
import { downloadPattern, slugify } from '../CatalogDetail/helper';
88
import { RESOURCE_TYPES } from '../CatalogDetail/types';
@@ -39,8 +39,6 @@ interface ColumnConfigProps {
3939
isFromWorkspaceTable?: boolean;
4040
isRemoveAllowed?: boolean;
4141
theme?: Theme;
42-
isVisibilityEnabled: boolean;
43-
handleVisibilityChange: (visibility: VIEW_VISIBILITY) => void;
4442
}
4543

4644
export const colViews: ColView[] = [
@@ -70,9 +68,7 @@ export const createDesignsColumnsConfig = ({
7068
isDownloadAllowed,
7169
isRemoveAllowed,
7270
theme,
73-
isFromWorkspaceTable = false,
74-
isVisibilityEnabled,
75-
handleVisibilityChange
71+
isFromWorkspaceTable = false
7672
}: ColumnConfigProps): MUIDataTableColumn[] => {
7773
return [
7874
{
@@ -154,17 +150,7 @@ export const createDesignsColumnsConfig = ({
154150
sort: false,
155151
searchable: true,
156152
customBodyRender: (value: VIEW_VISIBILITY) => {
157-
return (
158-
<VisibilityChipMenu
159-
value={value}
160-
onChange={(value) => handleVisibilityChange(value as VIEW_VISIBILITY)}
161-
enabled={isVisibilityEnabled}
162-
options={[
163-
[VIEW_VISIBILITY.PUBLIC, PublicIcon],
164-
[VIEW_VISIBILITY.PRIVATE, LockIcon]
165-
]}
166-
/>
167-
);
153+
return <VisibilityChipMenu value={value} enabled={false} />;
168154
}
169155
}
170156
},

src/custom/Workspaces/DesignTable.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ export interface DesignTableProps {
5656
isAssignAllowed: boolean;
5757
isRemoveAllowed: boolean;
5858
setDesignSearch: (value: string) => void;
59-
isVisibilityEnabled: boolean;
60-
handleVisibilityChange: (visibility: string) => void;
6159
}
6260

6361
export interface PublishModalState {
@@ -98,9 +96,7 @@ const DesignTable: React.FC<DesignTableProps> = ({
9896
isAssignAllowed,
9997
isRemoveAllowed,
10098
useGetWorkspaceDesignsQuery,
101-
setDesignSearch,
102-
isVisibilityEnabled,
103-
handleVisibilityChange
99+
setDesignSearch
104100
}) => {
105101
const [publishModal, setPublishModal] = useState<PublishModalState>({
106102
open: false,
@@ -136,9 +132,7 @@ const DesignTable: React.FC<DesignTableProps> = ({
136132
isUnpublishAllowed,
137133
isFromWorkspaceTable: true,
138134
isRemoveAllowed,
139-
theme,
140-
isVisibilityEnabled: isVisibilityEnabled,
141-
handleVisibilityChange: handleVisibilityChange
135+
theme
142136
});
143137

144138
const [publishSchema, setPublishSchema] = useState<{

0 commit comments

Comments
 (0)