Skip to content

Commit a705c4f

Browse files
committed
fix: export default 로 추가
1 parent a527a9e commit a705c4f

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/App.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import { Calendar } from './components/common/Calendar.tsx';
1+
import Calendar from './components/common/Calendar.tsx';
22

33
function App() {
4-
54
return (
65
<div>
76
<header className="relative z-10">
@@ -53,7 +52,6 @@ function App() {
5352
</main>
5453
</div>
5554
);
56-
5755
}
5856

5957
export default App;

src/components/common/Calendar.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ const events = [
2323
{ title: 'Meeting', start: '2024-05-08' },
2424
];
2525

26-
export function Calendar() {
27-
26+
export default function Calendar() {
2827
const [calendarHeight, setCalendarHeight] = useState<string | number>('auto');
2928
const calendarRef = useRef<FullCalendar | null>(null);
3029
const [selectedEvents, setSelectedEvents] = useState<Event[]>([]);
@@ -154,7 +153,7 @@ export function Calendar() {
154153
<div className="mt-10">{selectedDate && <EventCards events={selectedEvents} date={selectedDate} />}</div>
155154
</div>
156155
);
157-
};
156+
}
158157

159158
interface EventInfo {
160159
timeText: string;
@@ -174,7 +173,6 @@ function renderEventContent(eventInfo: EventInfo) {
174173
);
175174
}
176175

177-
178176
function EventCards({ events, date }: EventCardsProps) {
179177
const [menuOpen, setMenuOpen] = useState(-1);
180178

@@ -208,6 +206,7 @@ function EventCards({ events, date }: EventCardsProps) {
208206
<div className="mb-1 h-1 w-1 rounded-full bg-[#429400]"></div>
209207
<div className="h-1 w-1 rounded-full bg-[#429400]"></div>
210208
</div>
209+
{/* 메뉴 */}
211210
{menuOpen === index && (
212211
<div className="absolute right-0 top-10 z-10 rounded-lg bg-white shadow-md">
213212
<ul>
@@ -222,4 +221,3 @@ function EventCards({ events, date }: EventCardsProps) {
222221
</div>
223222
);
224223
}
225-

0 commit comments

Comments
 (0)