Skip to content

Commit 166bc6e

Browse files
committed
feat: remove any and add types
Signed-off-by: Amit Amrutiya <amitamrutiya2210@gmail.com>
1 parent 63b3a06 commit 166bc6e

2 files changed

Lines changed: 9 additions & 14 deletions

File tree

src/custom/CatalogDetail/helper.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
import jsyaml from 'js-yaml';
2-
import { CommunityClassIcon, OfficialClassIcon, VerificationClassIcon } from '../../icons';
3-
import { ContentClassType } from './types';
42

53
export const downloadYaml = (filteredData: string, itemName: string): void => {
64
const yamlData = Array.isArray(filteredData)
@@ -49,18 +47,6 @@ export const downloadFilter = (id: string, name: string): void => {
4947
linkElement.remove();
5048
};
5149

52-
export const CONTENT_CLASS: ContentClassType = {
53-
community: {
54-
icon: CommunityClassIcon
55-
},
56-
official: {
57-
icon: OfficialClassIcon
58-
},
59-
verified: {
60-
icon: VerificationClassIcon
61-
}
62-
};
63-
6450
export const formatToTitleCase = (value: string): string => {
6551
if (typeof value === 'string') {
6652
return value.substring(0, 1).toUpperCase().concat('', value.substring(1).toLowerCase());

src/custom/CatalogDetail/types.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,20 @@ export const RESOURCE_TYPES = {
4040
export type ContentClassType = {
4141
community: {
4242
icon: React.ComponentType;
43+
color: string;
4344
};
4445
official: {
4546
icon: React.ComponentType;
47+
color: string;
4648
};
4749
verified: {
4850
icon: React.ComponentType;
51+
color: string;
4952
};
5053
};
54+
55+
export type UserProfile = {
56+
first_name: string;
57+
last_name: string;
58+
avatar_url: string;
59+
};

0 commit comments

Comments
 (0)