Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
d2533cb
✨[Feat] μΊ˜λ¦°λ” 블둝 #10
cchaeyoung Oct 11, 2024
0fbaa8a
♻️[Refactor] link page 일뢀 νƒœκ·Έ λ³€κ²½ 및 style-type μ»΄ν¬λ„ŒνŠΈλ‘œ 뢄리 #8
wynter24 Oct 12, 2024
6c349e8
Merge branch 'main' of https://github.com/Mt-NextJs/linkle into featu…
wynter24 Oct 12, 2024
79ae64a
Merge branch 'main' of https://github.com/Mt-NextJs/linkle into featu…
cchaeyoung Oct 12, 2024
2d86b86
✨[Feat] μΊ˜λ¦°λ”λ·° μΆ”κ°€ #10
cchaeyoung Oct 12, 2024
03b1dac
πŸ’„[Design] μŠ€νƒ€μΌ 선택 체크 μ•„μ΄μ½˜ μΆ”κ°€ #8
wynter24 Oct 12, 2024
050acf1
♻️[Refactor] test #28
lumpenop Oct 13, 2024
8d442c9
✨[Feat] link-form μ»΄ν¬λ„ŒνŠΈ 생성, style type UI μž‘μ—… #8
wynter24 Oct 13, 2024
2aa9c79
♻️[Refactor] μΊ˜λ¦°λ” νŽ˜μ΄μ§€ 파일 톡합 #10
cchaeyoung Oct 13, 2024
a2567c1
Merge branch 'main' into test
lumpenop Oct 14, 2024
9894d23
Merge branch 'main' of https://github.com/Mt-NextJs/linkle into featu…
wynter24 Oct 14, 2024
9544a16
πŸ’„[Design] 이미지 section UI λ³€κ²½(file β†’ url) #8
wynter24 Oct 14, 2024
fe3c171
✨[Feat] μŠ€νƒ€μΌ νƒ€μž…λ³„ 이미지 μ„€μ • 및 μ˜€λ²„λ ˆμ΄ μΆ”κ°€ #8
wynter24 Oct 14, 2024
3a8aedf
✨[Feat] νŽ˜μ΄μ§€ μ„€λͺ… μ•„μ΄μ½˜ μΆ”κ°€ #8
wynter24 Oct 14, 2024
4a933a5
♻️[Refactor] FormInput μ»΄ν¬λ„ŒνŠΈ 뢄리 #8
wynter24 Oct 14, 2024
978d845
✨[Feat] 이미지 URL 검증 및 μ—λŸ¬ λ©”μ‹œμ§€ ν‘œμ‹œ #41
wynter24 Oct 15, 2024
61387bc
✨[Feat] ꡬ뢄선 블둝 ꡬ쑰 μ„€μ • #36
cchaeyoung Oct 16, 2024
4c0531f
✨[Feat] ꡬ뢄선 νƒ€μž… μ •μ˜ #36
cchaeyoung Oct 16, 2024
452fe94
Merge branch 'main' of https://github.com/Mt-NextJs/linkle into featu…
cchaeyoung Oct 16, 2024
e30b204
✨[Feat] ꡬ뢄선 νŽ˜μ΄μ§€ κΈ°λ³Έ ꡬ쑰 #36
cchaeyoung Oct 16, 2024
30bd329
✨[Feat] DividerPreview μ»΄ν¬λ„ŒνŠΈ κ΅¬ν˜„ #36
cchaeyoung Oct 16, 2024
4d927de
✨[Feat] DividerSelector μ»΄ν¬λ„ŒνŠΈ κ΅¬ν˜„ #36
cchaeyoung Oct 16, 2024
c2cc682
✨[Feat] ꡬ뢄선 νŽ˜μ΄μ§€μ— μ»΄ν¬λ„ŒνŠΈ 톡합 #36
cchaeyoung Oct 16, 2024
215839a
♻️[Refactor] Next.js 13 이미지 μ»΄ν¬λ„ŒνŠΈ κ²½κ³  제거 #8
wynter24 Oct 16, 2024
ceeca80
✨[Feat] DividerSelector μ»΄ν¬λ„ŒνŠΈ 상세 κ΅¬ν˜„ #36
cchaeyoung Oct 16, 2024
4e0a448
πŸ›[Fix] useEffect μ˜μ‘΄μ„± 배열에 setIsImageError μΆ”κ°€ν•˜μ—¬ κ²½κ³  ν•΄κ²° #8
wynter24 Oct 16, 2024
1783620
✨[Feat] 링크 μΆ”κ°€ κΈ°λŠ₯ κ΅¬ν˜„ 쀑, sequence 쀑볡 였λ₯˜ λ°œμƒ #68
wynter24 Oct 16, 2024
be5fb17
✨[Feat] DividerPreview μ»΄ν¬λ„ŒνŠΈ 상세 κ΅¬ν˜„ #36
cchaeyoung Oct 17, 2024
98b9615
Merge branch 'develop' of https://github.com/Mt-NextJs/linkle into fe…
wynter24 Oct 17, 2024
b005ed2
✨[Feat] ꡬ뢄선 블둝에 λ²„νŠΌ μ»΄ν¬λ„ŒνŠΈ μΆ”κ°€ #36
cchaeyoung Oct 17, 2024
443e629
πŸ“¦[Chore] λΉŒλ“œ κ³Όμ •μ—μ„œμ˜ λ³€κ²½ μ‚¬ν•­μœΌλ‘œ μΈν•œ 좩돌 λ“± 해결쀑 #8
s-ja Oct 17, 2024
ce68439
πŸ“¦[Chore] λΉŒλ“œ κ³Όμ •μ—μ„œμ˜ λ³€κ²½ μ‚¬ν•­μœΌλ‘œ μΈν•œ 좩돌 λ“± 해결쀑 #8
s-ja Oct 17, 2024
01c0504
Merge branch 'main' of https://github.com/Mt-NextJs/linkle into featu…
wynter24 Oct 17, 2024
d12825e
Merge branch 'develop' into feature/divider-block
cchaeyoung Oct 17, 2024
f5e51f7
✨[Feat] ꡬ뢄선 μΆ”κ°€ API 연동 #36
cchaeyoung Oct 17, 2024
ded0138
✨[Feat] 이벀트 νŽ˜μ΄μ§€ 퍼블리싱 #69
wynter24 Oct 17, 2024
28dbdea
✨[Feat] 링크 νŽ˜μ΄μ§€ API μ—°κ²° #68
wynter24 Oct 17, 2024
a87766c
✨[Feat] admin dnd 적용 #71
lumpenop Oct 17, 2024
52ba149
✨[Feat] admin dnd 적용 #71
lumpenop Oct 17, 2024
62161d9
Merge pull request #72 from Mt-NextJs/feature/admin-dnd
Defor721 Oct 18, 2024
395215c
πŸ’„[Design] submit button hover μΆ”κ°€ #8
wynter24 Oct 18, 2024
48b7985
✨ [Feat] admin page type μˆ˜μ • #14
Defor721 Oct 18, 2024
f20868f
Merge pull request #70 from Mt-NextJs/release/pre-deployment
Defor721 Oct 18, 2024
b1ba134
Merge branch 'develop' of https://github.com/Mt-NextJs/linkle into fe…
cchaeyoung Oct 18, 2024
89c94dc
✨ [Feat] admin api μž‘μ—… #14
Defor721 Oct 18, 2024
b5259bb
✨[Feat] μΆ”κ°€ μ™„λ£Œ λ²„νŠΌ 클릭 ν›„ input data reset #8
wynter24 Oct 18, 2024
8fce869
✨ [Feat] admin page 블둝 μ‚­μ œ κ΅¬ν˜„ #14
Defor721 Oct 18, 2024
644150e
✨[Feat] 곡톡 ν•¨μˆ˜ 뢄리λ₯Ό μœ„ν•œ lib 폴더 생성 및 ν•¨μˆ˜ 이동 #8
wynter24 Oct 18, 2024
34b5c64
✨ [Feat] empty-block으둜 뢄리, 블둝 없을 μ‹œ empty-block λ‚˜μ˜€λ„λ‘ λ³€κ²½ #14
Defor721 Oct 18, 2024
02341aa
πŸ›[Fix] getSequence ν•¨μˆ˜μ—μ„œ 빈 blockList 처리 μΆ”κ°€ #8
wynter24 Oct 18, 2024
6acb155
✨ [Feat] basicblock title,icon λΆ€λΆ„ μˆ˜μ • #14
Defor721 Oct 18, 2024
8ef6e1e
✨[Feat] 이미지 URL μž…λ ₯μ°½ μŠ€νƒ€μΌμ— λ”°λ₯Έ λΉ„ν™œμ„±ν™” 및 ν•„μˆ˜ μž…λ ₯ μ„€μ • μΆ”κ°€ #8
wynter24 Oct 18, 2024
916ed7a
✨ [Feat] basicblock λ‚΄λΆ€ λ Œλ”λ§μš© μ»΄ν¬λ„ŒνŠΈ 생성 #14
Defor721 Oct 18, 2024
60ab152
Merge branch 'develop' of github.com:Mt-NextJs/linkle into feature/ad…
Defor721 Oct 18, 2024
0237623
πŸ’„[Style] Prettier ν¬λ§·νŒ… μˆ˜μ • 및 .gitattributes μΆ”κ°€ν•˜μ—¬ LF둜 μ€„λ°”κΏˆ κ³ μ • #8
wynter24 Oct 18, 2024
af8da2f
πŸ“¦[Chore] 폴더 ꡬ쑰 λ³€κ²½: link 폴더λ₯Ό admin>block ν΄λ”λ‘œ 이동 #8
wynter24 Oct 18, 2024
acd6ec9
Merge branch 'feature/link-block' of https://github.com/Mt-NextJs/lin…
wynter24 Oct 18, 2024
1f18637
Merge pull request #76 from Mt-NextJs/feature/link-block-api
Defor721 Oct 18, 2024
b9a75fd
Merge pull request #73 from Mt-NextJs/feature/admin-page
Defor721 Oct 18, 2024
f157743
Merge branch 'develop' of github.com:Mt-NextJs/linkle into feature/ad…
Defor721 Oct 18, 2024
ade1cde
πŸ“¦[Chore] ν”„λ‘œμ νŠΈ μ„ΈνŒ… 및 λΉŒλ”© 마무리 #1 (#77)
s-ja Oct 19, 2024
3f3696c
✨[Feat] λΉ„λ‘œκ·ΈμΈ μƒνƒœμ—μ„œμ˜ λžœλ”©νŽ˜μ΄μ§€ 이동을 μœ„ν•œ 미듀웨어 파일 ꡬ좕쀑 #74
s-ja Oct 19, 2024
a0f3682
Merge branch 'develop' of https://github.com/Mt-NextJs/linkle into fe…
s-ja Oct 19, 2024
3bac3f5
πŸ›[Fix] μΊ˜λ¦°λ” 블둝 쀑볡 생성 μ—λŸ¬ 처리 #36
cchaeyoung Oct 19, 2024
26018f6
πŸ›[Fix] μΊ˜λ¦°λ” 블둝 쀑볡 생성 μ—λŸ¬ 처리 #10
cchaeyoung Oct 19, 2024
428b8b7
Merge branch 'feature/calendar-block' of https://github.com/Mt-NextJs…
s-ja Oct 19, 2024
9b939fe
♻️[Refactor] μΊ˜λ¦°λ” 폴더 μœ„μΉ˜ λ³€κ²½ #10
cchaeyoung Oct 19, 2024
149fa6e
✨[Feat] ScheduleList μ»΄ν¬λ„ŒνŠΈ κ΅¬ν˜„ #10
cchaeyoung Oct 19, 2024
b2ccf2f
Merge branch 'develop' of https://github.com/Mt-NextJs/linkle into fe…
cchaeyoung Oct 19, 2024
9465e7b
♻️[Refactor] ꡬ뢄선 블둝 μ‹œν€€μŠ€ 관리 둜직 κ°œμ„  #36
cchaeyoung Oct 19, 2024
3d6e028
✨[Feat] url validation μΆ”κ°€ #8
wynter24 Oct 19, 2024
d27efda
πŸ’„[Design] νˆ΄νŒμ— μ‚Όκ°ν˜• ν™”μ‚΄ν‘œ μΆ”κ°€ #8
wynter24 Oct 19, 2024
30a951e
♻️[Refactor] useEffect μ˜μ‘΄μ„± 배열에 isValidUrl μΆ”κ°€ν•˜μ—¬ κ²½κ³  ν•΄κ²° #8
wynter24 Oct 19, 2024
2e0a969
Merge branch 'develop' of https://github.com/Mt-NextJs/linkle into fe…
wynter24 Oct 19, 2024
25b6ef1
Merge branch 'main' of https://github.com/Mt-NextJs/linkle into featu…
wynter24 Oct 19, 2024
48d14c5
Merge branch 'develop' of https://github.com/Mt-NextJs/linkle into fe…
wynter24 Oct 19, 2024
95510d5
πŸ“¦[Chore] 폴더 ꡬ쑰 λ³€κ²½: event 폴더λ₯Ό admin>block ν΄λ”λ‘œ 이동 #69
wynter24 Oct 19, 2024
ea17172
πŸ“¦[Chore] react-datepicker νŒ¨ν‚€μ§€ μ„€μΉ˜ #69
wynter24 Oct 19, 2024
79bba7f
✨[Feat] 이벀트 일정 선택 κΈ°λŠ₯ κ΅¬ν˜„ (react-datepicker ν™œμš©) #69
wynter24 Oct 19, 2024
aa66276
Merge pull request #78 from Mt-NextJs/feature/divider-block
cchaeyoung Oct 20, 2024
23fe011
Merge branch 'develop' of https://github.com/Mt-NextJs/linkle into fe…
wynter24 Oct 20, 2024
ee7ed6e
Merge pull request #79 from Mt-NextJs/feature/link-block
wynter24 Oct 20, 2024
68b95b0
✨ [Feat] basic block μ„ΈλΆ€ λ‚΄μš© μ„€μ • #14
Defor721 Oct 20, 2024
cb52d4c
Merge branch 'develop' of https://github.com/Mt-NextJs/linkle into fe…
wynter24 Oct 20, 2024
c487308
Merge branch 'develop' of github.com:Mt-NextJs/linkle into feature/ad…
Defor721 Oct 20, 2024
6685e3f
Merge pull request #80 from Mt-NextJs/feature/admin-page
Defor721 Oct 20, 2024
d214a69
Merge pull request #81 from Mt-NextJs/feature/calendar-block
cchaeyoung Oct 20, 2024
23edf86
Merge pull request #82 from Mt-NextJs/feature/event-block
wynter24 Oct 20, 2024
39eebbd
Merge pull request #83 from Mt-NextJs/feature/landing-page
lumpenop Oct 20, 2024
7c6bc65
✨[Feat] μ‚¬μš©μž ν…Œλ§ˆμ— 따라 λ°°κ²½ 색 λ³€κ²½λ˜μ§€ μ•Šλ„λ‘ λ³€κ²½ #84
lumpenop Oct 20, 2024
4a95b0d
Merge pull request #86 from Mt-NextJs/feature/theme-fix
lumpenop Oct 20, 2024
92b8bfa
πŸ“¦[Chore] next.config.js 쀑볡 -> μ‚­μ œ #91
lumpenop Oct 20, 2024
a0b44cc
Merge pull request #92 from Mt-NextJs/feature/theme-fix
lumpenop Oct 20, 2024
e7db7e4
✨[Feat] 쀑간 병합 ν›„ 배포 ν…ŒμŠ€νŠΈλ₯Ό μœ„ν•œ 컀밋 #91 (#93)
s-ja Oct 20, 2024
1bd9334
✨[Feat] λž˜μ΄μ•„μ›ƒ μ»΄ν¬λ„ŒνŠΈ css μˆ˜μ • #94
lumpenop Oct 21, 2024
1ca7a44
✨[Feat] block-image, block-video api 연동 #87
lumpenop Oct 21, 2024
0803f6d
✨[Feat] block νŽ˜μ΄μ§€ order api #87
lumpenop Oct 21, 2024
7b987ef
Merge pull request #100 from Mt-NextJs/feature/theme-fix
lumpenop Oct 21, 2024
9d3ce57
✨[Feat] block 곡톡 μ»΄ν¬λ„ŒνŠΈ μž‘μ„± - input, button, layout #104
lumpenop Oct 21, 2024
6911f77
Merge pull request #105 from Mt-NextJs/feature/theme-fix
lumpenop Oct 21, 2024
40460fb
✨[Feat] λ ˆμ΄μ•„μ›ƒ μ»΄ν¬λ„ŒνŠΈ css μˆ˜μ • - μŠ€ν¬λ‘€λ°” display none #94
lumpenop Oct 22, 2024
0c02fee
Merge pull request #106 from Mt-NextJs/feature/theme-fix
lumpenop Oct 22, 2024
fadb1c8
✨[Feat] 이미지, λ™μ˜μƒ λ°•μŠ€ css λ³€κ²½, 각 url μœ νš¨μ„± 검사 #88
lumpenop Oct 22, 2024
eb04aa4
✨ [Feat] admin νŽ˜μ΄μ§€ λ””μžμΈ μ‘°μ • 및 κΈ°λŠ₯ 일뢀 κ΅¬ν˜„ #14
Defor721 Oct 22, 2024
59304f0
Merge branch 'develop' of github.com:Mt-NextJs/linkle into feature/ad…
Defor721 Oct 22, 2024
d2ec52f
Merge pull request #108 from Mt-NextJs/feature/theme-fix
lumpenop Oct 22, 2024
e40b263
✨[Feat] block layout λ¬ΌμŒν‘œ μ•„μ΄μ½˜μ„ μ»΄ν¬λ„ŒνŠΈλ‘œ 뢄리 #110
lumpenop Oct 22, 2024
b82a255
Merge pull request #113 from Mt-NextJs/feature/theme-fix
lumpenop Oct 22, 2024
ffe3613
Merge pull request #114 from Mt-NextJs/feature/admin-page
Defor721 Oct 22, 2024
f86bec8
✨[Feat] block post api ν˜ΈμΆœν•˜λŠ” ν•¨μˆ˜ 생성 #111
lumpenop Oct 22, 2024
453a162
Merge pull request #116 from Mt-NextJs/feature/theme-fix
lumpenop Oct 22, 2024
5656e4c
✨[Feat] 이벀트 블둝 API μ—°κ²° 및 λ””μžμΈ μˆ˜μ • #109 (#117)
wynter24 Oct 22, 2024
41152ef
✨[Feat] λžœλ”© νŽ˜μ΄μ§€ κ΅¬ν˜„ #32 (#112)
s-ja Oct 22, 2024
fd28f1f
🎨✨ [Style/Feat] 링크 블둝 UI μˆ˜μ • 및 κΈ°λŠ₯ μΆ”κ°€ #97 (#118)
wynter24 Oct 22, 2024
c0cb8b8
Merge branch 'main' of https://github.com/Mt-NextJs/linkle into hotfi…
s-ja Oct 22, 2024
0258642
πŸš‘[HOTFIX] 배포 κ³Όμ •μ—μ„œ 좩돌 ν•΄κ²° ν›„ ν…ŒμŠ€νŠΈ 쀑 λ°œκ²¬ν•œ 잘λͺ»λœ μ½”λ“œ μˆ˜μ • #120
s-ja Oct 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .env

This file was deleted.

24 changes: 0 additions & 24 deletions src/app/(intro)/page.tsx

This file was deleted.

17 changes: 8 additions & 9 deletions src/app/admin/block/components/buttons/add-button.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import React from "react";

interface Props {
type Props = {
text: string;
onClick: () => void;
disabled?: boolean;
}
const AddButton = ({ text, onClick, disabled }: Props) => {
const bgColor = disabled ? "bg-orange-100" : "bg-orange-600";
} & React.ComponentPropsWithoutRef<"button">;
const AddButton = ({ text, ...buttonProps }: Props) => {
const { disabled } = buttonProps;
const bgColor = disabled ? "bg-primary-100" : "bg-primary-450";
const textColor = disabled ? "text-orange-300" : "text-slate-200";

return (
<button
className={`h-12 w-full rounded-lg ${bgColor} ${textColor} font-bold`}
onClick={onClick}
disabled={disabled}
className={`h-14 w-full rounded-lg ${bgColor} ${textColor} font-bold`}
{...buttonProps}
>
{text}
</button>
Expand Down
33 changes: 33 additions & 0 deletions src/app/admin/block/components/form-input.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
"use client";

import React from "react";

type FormInputProps = {
label: string;
id: string;
} & React.ComponentPropsWithoutRef<"input">;

export default function FormInput({
label,
id,
...inputProps
}: FormInputProps) {
const { required, maxLength, value } = inputProps;
return (
<div className="flex flex-col gap-2">
<div className="flex justify-between">
<label className="title block" htmlFor={id}>
{label}
{required && <span className="text-red-500">*</span>}
</label>
{maxLength && (
<div className="text-slate-400">
{value ? (value as string)?.length : 0}
<span className="text-[12px] text-slate-600"> / {maxLength}</span>
</div>
)}
</div>
<input id={id} {...inputProps} />
</div>
);
}
34 changes: 22 additions & 12 deletions src/app/admin/block/components/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,38 @@
"use client";
import React from "react";
import React, { FormEvent } from "react";
import Image from "next/image";
import { useRouter } from "next/navigation";
import QuestionIcon from "@app/admin/block/components/question-icon";

const Layout = ({
title,
onSubmit,
children,
}: Readonly<{
title: string;
onSubmit?: (e: FormEvent<HTMLFormElement>) => void;
children: React.ReactNode;
}>) => {
const router = useRouter();
return (
<div className="flex w-full flex-col gap-4 px-20 py-4">
<button onClick={() => router.back()}>
<Image
src="/assets/icons/icon_back.png"
alt="λ’€λ‘œκ°€κΈ° μ•„μ΄μ½˜"
width={34}
height={34}
/>
</button>
<h1>{title}</h1>
<div className="flex flex-col gap-4">{children}</div>
<div className="flex w-full flex-col gap-6 px-20 py-4">
<div>
<button type="button" onClick={() => router.back()}>
<Image
src="/assets/icons/icon_back.png"
alt="λ’€λ‘œκ°€κΈ° μ•„μ΄μ½˜"
width={34}
height={34}
/>
</button>
</div>
<div className="flex items-center gap-1">
<h1 className="pageName">{title}</h1>
<QuestionIcon title={title} />
</div>
<form onSubmit={onSubmit} className="flex flex-col gap-4">
{children}
</form>
</div>
);
};
Expand Down
26 changes: 26 additions & 0 deletions src/app/admin/block/components/question-icon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React from "react";
import Image from "next/image";

interface Props {
title: string;
}
const QuestionIcon = ({ title }: Props) => {
if (title !== "링크 블둝") return;
return (
<div className="group relative inline-block">
<Image
src="/assets/icons/icon_help.png"
alt="question"
width={30}
height={30}
/>
<div className="absolute left-2 top-20 w-max -translate-x-1/2 -translate-y-1/2 transform rounded bg-[#343434] px-3 py-3 text-sm text-white opacity-0 transition-opacity duration-300 group-hover:opacity-100">
β€’ κΈ°λ³Έ 정보와 곡개 μ—¬λΆ€ 값은 ν•„μˆ˜μž…λ‹ˆλ‹€. <br />β€’ μ˜ˆμ•½ κ³΅κ°œμ™€ μŠ€ν‹°μ»€λŠ”
ν”„λ‘œ κΈ°λŠ₯μž…λ‹ˆλ‹€.
<div className="absolute -top-3 left-1/2 h-0 w-0 rotate-90 border-y-8 border-r-8 border-y-transparent border-r-[#343434]"></div>
</div>
</div>
);
};

export default QuestionIcon;
2 changes: 1 addition & 1 deletion src/app/admin/block/components/text-input-box.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ interface Props {
title: string;
placeholder: string;
text: string;
setText: React.Dispatch<React.SetStateAction<string>>;
setText: (text: string) => void;
required?: boolean;
limit?: number;
}
Expand Down
80 changes: 73 additions & 7 deletions src/app/admin/block/event/components/calendar.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,76 @@
export default function Calendar({ label }: { label: string }) {
import DatePicker from "react-datepicker";

export default function Calendar({
startDate,
setStartDate,
endDate,
setEndDate,
startTime,
setStartTime,
endTime,
setEndTime,
}: {
startDate: Date | null;
setStartDate: (date: Date | null) => void;
endDate: Date | null;
setEndDate: (date: Date | null) => void;
startTime: Date | null;
setStartTime: (date: Date | null) => void;
endTime: Date | null;
setEndTime: (date: Date | null) => void;
}) {
return (
<>
<label htmlFor="start-date">{label}</label>
<input type="text" placeholder="λ‚ μ§œ 선택" />
<input type="time" placeholder="μ‹œκ°„ 선택" />
{/* μΊ˜λ¦°λ” */}
</>
<div className="flex flex-col gap-2">
<label className="title mb-[10px] block">
이벀트 일정 <span className="text-red-500">*</span>
</label>
<div className="flex flex-col items-start gap-5 bg-[#F6F6F6]">
{/* μ‹œμž‘ λ‚ μ§œ 및 μ‹œκ°„ 선택 */}
<div className="flex w-full items-center gap-4">
<label className="font-medium">μ‹œμž‘</label>
<DatePicker
selected={startDate}
onChange={(date: Date | null) => setStartDate(date)}
dateFormat="yyyy.MM.dd"
placeholderText="λ‚ μ§œ 선택"
className="w-full rounded-lg border-2 p-2"
/>
<DatePicker
selected={startTime}
onChange={(date: Date | null) => setStartTime(date)}
showTimeSelect
showTimeSelectOnly
timeIntervals={15}
timeCaption="μ‹œκ°„ 선택"
dateFormat="HH:mm"
placeholderText="μ‹œκ°„ 선택"
className="w-full rounded-lg border-2 p-2"
/>
</div>
{/* μ’…λ£Œ λ‚ μ§œ 및 μ‹œκ°„ 선택 */}
<div className="flex w-full items-center gap-4">
<label className="mb-2 font-medium">μ’…λ£Œ</label>
<DatePicker
selected={endDate}
onChange={(date: Date | null) => setEndDate(date)}
dateFormat="yyyy.MM.dd"
placeholderText="λ‚ μ§œ 선택"
minDate={startDate || undefined}
className="w-full rounded-lg border-2 p-2"
/>
<DatePicker
selected={endTime}
onChange={(date: Date | null) => setEndTime(date)}
showTimeSelect
showTimeSelectOnly
timeIntervals={15}
timeCaption="μ‹œκ°„ 선택"
dateFormat="HH:mm"
placeholderText="μ‹œκ°„ 선택"
className="w-full rounded-lg border-2 p-2"
/>
</div>
</div>
</div>
);
}
Loading