Skip to content

Commit

Permalink
refactor: categotyType string을 CategoryVaraint type으로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
hae-on committed Oct 14, 2023
1 parent fba407e commit 1be4505
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion frontend/src/types/ranking.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { CategoryVariant } from './common';
import type { Member } from './member';
import type { Product } from './product';

Expand All @@ -10,7 +11,7 @@ export interface ReviewRanking {
content: string;
rating: number;
favoriteCount: number;
categoryType: string;
categoryType: CategoryVariant;
}

export interface RecipeRanking {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/types/review.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Tag, TagVariants } from './common';
import type { CategoryVariant, Tag, TagVariants } from './common';

export interface Review {
id: number;
Expand All @@ -15,7 +15,7 @@ export interface Review {
}

export interface ReviewDetail extends Review {
categoryType: string;
categoryType: CategoryVariant;
productId: number;
productName: string;
}
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/types/search.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import type { CategoryVariant } from './common';
import type { Product } from './product';

export interface ProductSearchResult extends Product {
categoryType: string;
categoryType: CategoryVariant;
}

export type ProductSearchAutocomplete = Pick<ProductSearchResult, 'id' | 'name' | 'categoryType'>;

0 comments on commit 1be4505

Please sign in to comment.