Skip to content

Commit eb718e8

Browse files
fix imports
Signed-off-by: Rajesh-Nagarajan-11 <rajeshnagarajan36@gmail.com>
1 parent 864ab0f commit eb718e8

File tree

4 files changed

+9
-13
lines changed

4 files changed

+9
-13
lines changed

src/__testing__/ResponsiveDataTable.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import React from 'react';
21
import { render, screen } from '@testing-library/react';
2+
import React from 'react';
33
import { SistentThemeProvider } from '../theme';
44

55
jest.mock('react-markdown', () => ({

src/custom/CatalogDetail/ContentClassInfo.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react';
22
import { Box } from '../../base';
33
import { CommunityClassIcon, OfficialClassIcon, VerificationClassIcon } from '../../icons';
4+
import { IconProps } from '../../icons/types';
45
import { KEPPEL, useTheme } from '../../theme';
56
import { InfoTooltip } from '../CustomTooltip';
67
import { ContentDetailsPoints, ContentDetailsText } from '../Typography';
@@ -35,11 +36,9 @@ const ContentClassInfo: React.FC<ContentClassInfoProps> = ({ contentClass, class
3536
}
3637
} as const;
3738

38-
const ClassIcon: React.FC<{ className: string }> = ({ className }) => {
39-
const Icon = CONTENT_CLASS[className]?.icon;
40-
const fill = CONTENT_CLASS[className]?.color;
41-
return Icon ? <Icon width="25px" height="25px" fill={fill} /> : null;
42-
};
39+
const Icon = CONTENT_CLASS[contentClass as keyof ContentClassType]
40+
?.icon as React.ComponentType<IconProps>;
41+
const iconFill = CONTENT_CLASS[contentClass as keyof ContentClassType]?.color;
4342

4443
return (
4544
<div>
@@ -61,7 +60,7 @@ const ContentClassInfo: React.FC<ContentClassInfoProps> = ({ contentClass, class
6160
fontFamily: 'inherit'
6261
}}
6362
>
64-
<ClassIcon className={contentClass} />
63+
{Icon && <Icon width="25px" height="25px" fill={iconFill} />}
6564
{formatToTitleCase(contentClass)}
6665
</ContentDetailsText>
6766
</div>

src/custom/ShareModal/ShareModal.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { CircularProgress, SelectChangeEvent } from '@mui/material';
2+
import { startCase } from 'lodash';
23
import React, { useEffect, useState } from 'react';
34
import {
45
Avatar,
@@ -11,6 +12,7 @@ import {
1112
MenuItem,
1213
Typography
1314
} from '../../base';
15+
import { VISIBILITY } from '../../constants/constants';
1416
import { ChainIcon, DeleteIcon, LockIcon, PublicIcon } from '../../icons';
1517
import { useTheme } from '../../theme';
1618
import { BLACK, WHITE } from '../../theme/colors';
@@ -163,9 +165,6 @@ export type ResourceAccessArg = {
163165
};
164166
};
165167

166-
import { startCase } from 'lodash';
167-
import { VISIBILITY } from '../../constants/constants';
168-
169168
interface ShareModalProps {
170169
/** Function to close the share modal */
171170
handleShareModalClose: () => void;

src/theme/theme.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { alpha, createTheme, darken, PaletteMode } from '@mui/material';
22
import { components } from './components';
33
import { darkModePalette, lightModePalette, ThemePalette } from './palette';
44
import { typography } from './typography';
5+
import * as Colors from './colors';
56

67
import _ from 'lodash';
78

@@ -120,9 +121,6 @@ export type PrimitivePalette = {
120121
*/
121122
foreground: string;
122123
};
123-
124-
import * as Colors from './colors';
125-
126124
/**
127125
* Layer5 ( primitives ) defines the raw, brand-level colors used in the UI.
128126
*/

0 commit comments

Comments
 (0)