Skip to content

Commit

Permalink
fix: fix type err (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
dohui-son committed Jul 5, 2024
1 parent 5aea539 commit 12b8818
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/Filter/DateRange.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ const DatePickerItem = styled.div`
* dateRange - [startDate, endDate]
*/
export interface FilterDateRangeProps {
dateRange: Array<Date>;
changeValue: (dateRange: Array<Date>) => void;
dateRange: Array<Date | null>;
changeValue: (dateRange: Array<Date | null>) => void;
startDateLabel?: string;
endDateLabel?: string;
language: DatePickerLocale;
Expand Down
4 changes: 2 additions & 2 deletions src/stories/Filter.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const INIT_FILTER_VALUE: FilterValues = {
생성일: '0',
};

type CustomValue = [Date, Date] | [null, null];
type CustomValue = Array<Date | null>;
const INIT_CUSTOM_VALUE: CustomValue = [null, null];

const SelectedValueWrapper = styled.div`
Expand Down Expand Up @@ -124,7 +124,7 @@ export function Basic() {
/>
{filterValues[category.label] === '직접입력' && (
<Filter.DateRange
dateRange={customValue as [Date, Date]}
dateRange={customValue}
changeValue={value => {
setCustomValue(value);
}}
Expand Down

0 comments on commit 12b8818

Please sign in to comment.