feat: bootstrap lunch picker miniapp with backend, docs, and branding assets
This commit is contained in:
43
template/src/constants/restaurant.ts
Normal file
43
template/src/constants/restaurant.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import type {
|
||||
CategoryFilter,
|
||||
RestaurantCategory,
|
||||
SortOption,
|
||||
} from '../features/restaurants/types';
|
||||
|
||||
export const CATEGORY_OPTIONS: CategoryFilter[] = [
|
||||
'ALL',
|
||||
'KOREAN',
|
||||
'CHINESE',
|
||||
'JAPANESE',
|
||||
'WESTERN',
|
||||
'OTHER',
|
||||
];
|
||||
|
||||
export const CATEGORY_LABELS: Record<CategoryFilter, string> = {
|
||||
ALL: '전체',
|
||||
KOREAN: '한식',
|
||||
CHINESE: '중식',
|
||||
JAPANESE: '일식',
|
||||
WESTERN: '양식',
|
||||
OTHER: '기타',
|
||||
};
|
||||
|
||||
export const SORT_OPTIONS: SortOption[] = ['distance', 'rating', 'likes'];
|
||||
|
||||
export const SORT_LABELS: Record<SortOption, string> = {
|
||||
distance: '거리순',
|
||||
rating: '평점순',
|
||||
likes: '좋아요순',
|
||||
};
|
||||
|
||||
export const RADIUS_OPTIONS = [500, 1000, 2000] as const;
|
||||
|
||||
export const RADIUS_LABELS: Record<(typeof RADIUS_OPTIONS)[number], string> = {
|
||||
500: '500m',
|
||||
1000: '1km',
|
||||
2000: '2km',
|
||||
};
|
||||
|
||||
export function isCategory(value: string): value is RestaurantCategory {
|
||||
return ['KOREAN', 'CHINESE', 'JAPANESE', 'WESTERN', 'OTHER'].includes(value);
|
||||
}
|
||||
Reference in New Issue
Block a user