Skip to content

Commit

Permalink
(#58) Calendar Component useId 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
JinJu committed Dec 6, 2023
1 parent 87094d7 commit c531b7a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/components/DateSelect/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState } from "react";
import { useState, useId } from "react";
import dayjs from "dayjs";
import clsx from "clsx";
import { CalendarBlank } from "@phosphor-icons/react";
Expand All @@ -21,6 +21,7 @@ const DateSelect = ({
onClose,
onDateClick,
}: DateSelectProps) => {
const id = useId();
const startDate = dayjs(periodDates.startDate).format("YYYY. MM. DD");
const fullEndDate = dayjs(periodDates.endDate).format("YYYY. MM. DD");
const { contentRef } = useClickOutside<HTMLDivElement>(onClose);
Expand All @@ -34,7 +35,7 @@ const DateSelect = ({
<GeneralTab.Item
key = {item.key}
label = {item.label}
name = {"plate"}
name = {id}
theme = "body-01-bold"
checked = {item.key === tabSelected}
value = {item.key}
Expand Down

0 comments on commit c531b7a

Please sign in to comment.