Skip to content

Commit 701cb26

Browse files
committed
refactor: streamline Article and Product types by reorganizing properties and enhancing clarity
1 parent 62def59 commit 701cb26

1 file changed

Lines changed: 12 additions & 14 deletions

File tree

src/types/index.ts

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,26 +32,25 @@ export type BaseEntry = {
3232
id: string
3333
url: string
3434
title: string
35-
}
36-
37-
export type Article = BaseEntry & {
38-
published_at: number
3935
tags: Array<string>
40-
points_count: number
4136
comments_count: number
42-
votes_count: number
37+
points_count: number
4338
image_url: string
44-
tagline?: string
39+
published_at: number
40+
description?: string
41+
}
42+
43+
export type Article = BaseEntry & {
4544
source: string
4645
original_url?: string
4746
comments_url?: string
48-
description?: string
49-
subreddit?: string
50-
flair_text?: string
51-
flair_background_color?: string
52-
flair_text_color?: string
5347
}
5448

49+
export type Product = BaseEntry & {
50+
tagline: string
51+
votes_count: number
52+
topics: Array<string>
53+
}
5554
export type FeedItem = {
5655
title: string
5756
id: string
@@ -106,7 +105,7 @@ export type Repository = BaseEntry & {
106105
export type Conference = BaseEntry & {
107106
start_date: number
108107
end_date: number
109-
tag: string
108+
tags: string[]
110109
online: Boolean
111110
city?: string
112111
country?: string
@@ -136,7 +135,6 @@ export type BaseItemPropsType<
136135
id: string
137136
}
138137
> = {
139-
index: number
140138
item: T
141139
className?: string
142140
analyticsTag: string

0 commit comments

Comments
 (0)