This commit is contained in:
focp212@naver.com
2025-10-31 08:34:26 +09:00
79 changed files with 1997 additions and 1053 deletions

View File

@@ -1,17 +1,24 @@
import { SortTypeKeys, SortTypeBoxProps } from '../model/types';
import { useTranslation } from 'react-i18next';
export const SortTypeBox = ({
sortType,
onClickToSort,
sortOptions = [
{ key: SortTypeKeys.LATEST, label: '최신순' },
{ key: SortTypeKeys.HIGH_AMOUNT, label: '고액순' }
]
sortOptions
}: SortTypeBoxProps) => {
const { t } = useTranslation();
const defaultSortOptions = [
{ key: SortTypeKeys.LATEST, label: t('filter.sortOrders.latest') },
{ key: SortTypeKeys.HIGH_AMOUNT, label: t('filter.sortOrders.highest') }
];
const options = sortOptions || defaultSortOptions;
return (
<>
<div className="sort-options">
{ sortOptions.map((option: Record<string, any>, index: number) => (
{ options.map((option: Record<string, any>, index: number) => (
<>
{ (index > 0) &&
<span