@edu-tosel/design 1.0.157 → 1.0.159

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/globals.css CHANGED
@@ -1,269 +1,269 @@
1
- @tailwind base;
2
- @tailwind components;
3
- @tailwind utilities;
4
-
5
- .image-container {
6
- display: -webkit-box;
7
- display: -ms-flexbox;
8
- display: flex;
9
- }
10
-
11
- @font-face {
12
- font-family: "Pretendard-Medium";
13
- src: url("./asset/fonts/Pretendard-Medium.otf") format("opentype");
14
- }
15
-
16
- @font-face {
17
- font-family: "Pretendard-Bold";
18
- src: url("./asset/fonts/Pretendard-Bold.otf") format("opentype");
19
- }
20
-
21
- @font-face {
22
- font-family: "Pretendard-Light";
23
- src: url("./asset/fonts/Pretendard-Light.otf") format("opentype");
24
- }
25
-
26
- @font-face {
27
- font-family: "Kostar";
28
- src: url("./asset/fonts/Kostar.ttf") format("truetype");
29
- }
30
-
31
- @font-face {
32
- font-family: "NicoMoji";
33
- src: url("./asset/fonts/NicoMoji.ttf") format("truetype");
34
- }
35
-
36
- @font-face {
37
- font-family: "Megrim";
38
- src: url("./asset/fonts/Megrim.ttf") format("truetype");
39
- }
40
-
41
- @font-face {
42
- font-family: "Times-Newer-Roman-Bold";
43
- src: url("./asset/fonts/TimesNewerRoman-Bold.otf") format("opentype");
44
- }
45
-
46
- @font-face {
47
- font-family: "Times-Newer-Roman-BoldItalic";
48
- src: url("./asset/fonts/TimesNewerRoman-BoldItalic.otf") format("opentype");
49
- }
50
-
51
- @font-face {
52
- font-family: "PretendardVariable";
53
- src: url("./asset/fonts/PretendardVariable.ttf") format("truetype");
54
- }
55
-
56
- input[type="date"]::-webkit-inner-spin-button,
57
- input[type="date"]::-webkit-calendar-picker-indicator {
58
- display: none;
59
- -webkit-appearance: none;
60
- }
61
-
62
- ::-webkit-scrollbar {
63
- width: 3px;
64
- padding-right: 10px;
65
- }
66
-
67
- ::-webkit-scrollbar-track {
68
- background-color: transparent;
69
- }
70
- ::-webkit-scrollbar-thumb {
71
- background-color: #808080;
72
- opacity: 0.5;
73
- border-radius: 10px;
74
- }
75
-
76
- .box-shadow {
77
- box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.15);
78
- }
79
- .box-shadow-md {
80
- box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
81
- }
82
- .box-shadow-sm {
83
- box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.1);
84
- }
85
- .border-gradient-green-to-red {
86
- }
87
-
88
- .x-shape {
89
- position: relative;
90
- width: 0.83625rem;
91
- height: 0.83625rem;
92
- }
93
-
94
- .x-shape::before,
95
- .x-shape::after {
96
- content: "";
97
- position: absolute;
98
- top: 50%;
99
- left: 50%;
100
- width: 2.5px;
101
- border-radius: 2px;
102
- height: 100%;
103
- background-color: white;
104
- transform-origin: center;
105
- }
106
-
107
- .x-shape::before {
108
- transform: translate(-50%, -50%) rotate(45deg);
109
- }
110
-
111
- .x-shape::after {
112
- transform: translate(-50%, -50%) rotate(-45deg);
113
- }
114
-
115
- .border-inner {
116
- box-shadow: 0 0 0 1px #e5e7eb inset, 0 4px 6px -1px rgba(0, 0, 0, 0.1),
117
- 0 2px 4px -1px rgba(0, 0, 0, 0.06);
118
- }
119
- .box-shadow-focus:focus {
120
- box-shadow: 0 0 0 1px #e5e7eb inset, 0 4px 6px -1px rgba(0, 0, 0, 0.1),
121
- 0 2px 4px -1px rgba(0, 0, 0, 0.06);
122
- }
123
- .box-shadow-focus-red:focus {
124
- box-shadow: 0px 0px 10px 0px #ff8383;
125
- }
126
- .box-green {
127
- background: rgba(16, 86, 82, 0.1);
128
- color: #105652;
129
- }
130
- .box-shadow-green-sm {
131
- box-shadow: 0px 0px 10px 0px rgba(16, 86, 82, 0.38);
132
- }
133
- .box-green-focus:focus {
134
- background: white;
135
- color: black;
136
- box-shadow: 0px 0px 10px 0px rgba(16, 86, 82, 0.38);
137
- }
138
- /* box-shadow: 0px 0px 10px 0px rgba(16, 86, 82, 0.38); */
139
- .box-inner-shadow:hover {
140
- box-shadow: 0 0 0 1px #e5e7eb inset, 0 4px 6px -1px rgba(0, 0, 0, 0.1),
141
- 0 2px 4px -1px rgba(0, 0, 0, 0.06);
142
- }
143
- /* Date Picker Css */
144
- .react-datepicker__day--selected {
145
- background-color: #105652 !important;
146
- }
147
- .react-datepicker__header {
148
- background: white !important;
149
- border: none !important;
150
- }
151
- .react-datepicker {
152
- box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.15) !important;
153
- border-radius: 0.375rem !important;
154
- border: none !important;
155
- }
156
- .react-datepicker__day--keyboard-selected {
157
- background-color: white !important;
158
- color: black !important;
159
- }
160
- .react-datepicker__day--outside-month {
161
- color: rgb(161 161 170) !important;
162
- }
163
- .react-datepicker__month-container {
164
- padding-top: 1rem;
165
- padding-left: 1rem;
166
- padding-right: 1rem;
167
- padding-bottom: 0.5rem;
168
- }
169
- .react-datepicker-popper {
170
- transform: translate(0px 295px) !important;
171
- }
172
- .react-datepicker__input-container {
173
- text-align: center !important;
174
- border-radius: 0.375rem !important;
175
- transition: all 0.3s;
176
- }
177
- .react-datepicker__input-container > input {
178
- cursor: pointer !important;
179
- }
180
- .react-datepicker__input-container:hover {
181
- box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.15) !important;
182
- }
183
- .react-datepicker__navigation {
184
- top: 18px !important;
185
- }
186
- .react-datepicker__navigation--next {
187
- right: 20px !important;
188
- }
189
- .react-datepicker__navigation--previous {
190
- left: 182px !important;
191
- }
192
- .react-datepicker__current-month {
193
- text-align: left !important;
194
- margin-left: 16px !important;
195
- }
196
- .react-datepicker__triangle {
197
- display: none !important;
198
- }
199
- .react-datepicker__children-container {
200
- width: 16rem !important;
201
- }
202
- /* toggle button */
203
- .toggle[type="checkbox"]::before {
204
- content: "";
205
- position: absolute;
206
- left: 1px;
207
- top: 1px;
208
- width: 1.1rem;
209
- height: 1.1rem;
210
- border-radius: 50%;
211
- transform: scale(0.9);
212
- background-color: white;
213
- transition: left 100ms linear;
214
- }
215
- .toggle[type="checkbox"]:checked::before {
216
- background-color: white;
217
- left: 1.32rem;
218
- }
219
- .toggle[type="checkbox"]:checked {
220
- background-color: #105652;
221
- }
222
- .toggle[type="checkbox"]:disabled {
223
- opacity: 0.3;
224
- cursor: not-allowed;
225
- }
226
- .toggle[type="checkbox"]:disabled + span {
227
- opacity: 0.3;
228
- cursor: not-allowed;
229
- }
230
-
231
- /* checkbox */
232
- .check-box[type="checkbox"]:checked {
233
- border-color: transparent;
234
- background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5.707 7.293a1 1 0 0 0-1.414 1.414l2 2a1 1 0 0 0 1.414 0l4-4a1 1 0 0 0-1.414-1.414L7 8.586 5.707 7.293z'/%3e%3c/svg%3e");
235
- background-size: 150%;
236
- background-position: 50%;
237
- background-repeat: no-repeat;
238
- }
239
- .check-box[type="checkbox"]:disabled {
240
- background-color: #7f7f7f;
241
- }
242
- .box-shadow-green:hover {
243
- box-shadow: 0px 0px 20px 0px rgba(16, 86, 82, 0.5);
244
- }
245
-
246
- .fade-enter {
247
- opacity: 0;
248
- }
249
- .fade-enter-active {
250
- opacity: 1;
251
- transition: opacity 0.5s ease-in-out;
252
- }
253
- .fade-exit {
254
- opacity: 1;
255
- }
256
- .fade-exit-active {
257
- opacity: 0;
258
- transition: opacity 0.5s ease-in-out;
259
- }
260
-
261
- .text-gradient-green-to-red {
262
- background: var(
263
- --gradient-main,
264
- linear-gradient(269deg, #760023 0%, #105652 100%)
265
- );
266
- background-clip: text;
267
- -webkit-background-clip: text;
268
- -webkit-text-fill-color: transparent;
269
- }
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ .image-container {
6
+ display: -webkit-box;
7
+ display: -ms-flexbox;
8
+ display: flex;
9
+ }
10
+
11
+ @font-face {
12
+ font-family: "Pretendard-Medium";
13
+ src: url("./asset/fonts/Pretendard-Medium.otf") format("opentype");
14
+ }
15
+
16
+ @font-face {
17
+ font-family: "Pretendard-Bold";
18
+ src: url("./asset/fonts/Pretendard-Bold.otf") format("opentype");
19
+ }
20
+
21
+ @font-face {
22
+ font-family: "Pretendard-Light";
23
+ src: url("./asset/fonts/Pretendard-Light.otf") format("opentype");
24
+ }
25
+
26
+ @font-face {
27
+ font-family: "Kostar";
28
+ src: url("./asset/fonts/Kostar.ttf") format("truetype");
29
+ }
30
+
31
+ @font-face {
32
+ font-family: "NicoMoji";
33
+ src: url("./asset/fonts/NicoMoji.ttf") format("truetype");
34
+ }
35
+
36
+ @font-face {
37
+ font-family: "Megrim";
38
+ src: url("./asset/fonts/Megrim.ttf") format("truetype");
39
+ }
40
+
41
+ @font-face {
42
+ font-family: "Times-Newer-Roman-Bold";
43
+ src: url("./asset/fonts/TimesNewerRoman-Bold.otf") format("opentype");
44
+ }
45
+
46
+ @font-face {
47
+ font-family: "Times-Newer-Roman-BoldItalic";
48
+ src: url("./asset/fonts/TimesNewerRoman-BoldItalic.otf") format("opentype");
49
+ }
50
+
51
+ @font-face {
52
+ font-family: "PretendardVariable";
53
+ src: url("./asset/fonts/PretendardVariable.ttf") format("truetype");
54
+ }
55
+
56
+ input[type="date"]::-webkit-inner-spin-button,
57
+ input[type="date"]::-webkit-calendar-picker-indicator {
58
+ display: none;
59
+ -webkit-appearance: none;
60
+ }
61
+
62
+ ::-webkit-scrollbar {
63
+ width: 3px;
64
+ padding-right: 10px;
65
+ }
66
+
67
+ ::-webkit-scrollbar-track {
68
+ background-color: transparent;
69
+ }
70
+ ::-webkit-scrollbar-thumb {
71
+ background-color: #808080;
72
+ opacity: 0.5;
73
+ border-radius: 10px;
74
+ }
75
+
76
+ .box-shadow {
77
+ box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.15);
78
+ }
79
+ .box-shadow-md {
80
+ box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
81
+ }
82
+ .box-shadow-sm {
83
+ box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.1);
84
+ }
85
+ .border-gradient-green-to-red {
86
+ }
87
+
88
+ .x-shape {
89
+ position: relative;
90
+ width: 0.83625rem;
91
+ height: 0.83625rem;
92
+ }
93
+
94
+ .x-shape::before,
95
+ .x-shape::after {
96
+ content: "";
97
+ position: absolute;
98
+ top: 50%;
99
+ left: 50%;
100
+ width: 2.5px;
101
+ border-radius: 2px;
102
+ height: 100%;
103
+ background-color: white;
104
+ transform-origin: center;
105
+ }
106
+
107
+ .x-shape::before {
108
+ transform: translate(-50%, -50%) rotate(45deg);
109
+ }
110
+
111
+ .x-shape::after {
112
+ transform: translate(-50%, -50%) rotate(-45deg);
113
+ }
114
+
115
+ .border-inner {
116
+ box-shadow: 0 0 0 1px #e5e7eb inset, 0 4px 6px -1px rgba(0, 0, 0, 0.1),
117
+ 0 2px 4px -1px rgba(0, 0, 0, 0.06);
118
+ }
119
+ .box-shadow-focus:focus {
120
+ box-shadow: 0 0 0 1px #e5e7eb inset, 0 4px 6px -1px rgba(0, 0, 0, 0.1),
121
+ 0 2px 4px -1px rgba(0, 0, 0, 0.06);
122
+ }
123
+ .box-shadow-focus-red:focus {
124
+ box-shadow: 0px 0px 10px 0px #ff8383;
125
+ }
126
+ .box-green {
127
+ background: rgba(16, 86, 82, 0.1);
128
+ color: #105652;
129
+ }
130
+ .box-shadow-green-sm {
131
+ box-shadow: 0px 0px 10px 0px rgba(16, 86, 82, 0.38);
132
+ }
133
+ .box-green-focus:focus {
134
+ background: white;
135
+ color: black;
136
+ box-shadow: 0px 0px 10px 0px rgba(16, 86, 82, 0.38);
137
+ }
138
+ /* box-shadow: 0px 0px 10px 0px rgba(16, 86, 82, 0.38); */
139
+ .box-inner-shadow:hover {
140
+ box-shadow: 0 0 0 1px #e5e7eb inset, 0 4px 6px -1px rgba(0, 0, 0, 0.1),
141
+ 0 2px 4px -1px rgba(0, 0, 0, 0.06);
142
+ }
143
+ /* Date Picker Css */
144
+ .react-datepicker__day--selected {
145
+ background-color: #105652 !important;
146
+ }
147
+ .react-datepicker__header {
148
+ background: white !important;
149
+ border: none !important;
150
+ }
151
+ .react-datepicker {
152
+ box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.15) !important;
153
+ border-radius: 0.375rem !important;
154
+ border: none !important;
155
+ }
156
+ .react-datepicker__day--keyboard-selected {
157
+ background-color: white !important;
158
+ color: black !important;
159
+ }
160
+ .react-datepicker__day--outside-month {
161
+ color: rgb(161 161 170) !important;
162
+ }
163
+ .react-datepicker__month-container {
164
+ padding-top: 1rem;
165
+ padding-left: 1rem;
166
+ padding-right: 1rem;
167
+ padding-bottom: 0.5rem;
168
+ }
169
+ .react-datepicker-popper {
170
+ transform: translate(0px 295px) !important;
171
+ }
172
+ .react-datepicker__input-container {
173
+ text-align: center !important;
174
+ border-radius: 0.375rem !important;
175
+ transition: all 0.3s;
176
+ }
177
+ .react-datepicker__input-container > input {
178
+ cursor: pointer !important;
179
+ }
180
+ .react-datepicker__input-container:hover {
181
+ box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.15) !important;
182
+ }
183
+ .react-datepicker__navigation {
184
+ top: 18px !important;
185
+ }
186
+ .react-datepicker__navigation--next {
187
+ right: 20px !important;
188
+ }
189
+ .react-datepicker__navigation--previous {
190
+ left: 182px !important;
191
+ }
192
+ .react-datepicker__current-month {
193
+ text-align: left !important;
194
+ margin-left: 16px !important;
195
+ }
196
+ .react-datepicker__triangle {
197
+ display: none !important;
198
+ }
199
+ .react-datepicker__children-container {
200
+ width: 16rem !important;
201
+ }
202
+ /* toggle button */
203
+ .toggle[type="checkbox"]::before {
204
+ content: "";
205
+ position: absolute;
206
+ left: 1px;
207
+ top: 1px;
208
+ width: 1.1rem;
209
+ height: 1.1rem;
210
+ border-radius: 50%;
211
+ transform: scale(0.9);
212
+ background-color: white;
213
+ transition: left 100ms linear;
214
+ }
215
+ .toggle[type="checkbox"]:checked::before {
216
+ background-color: white;
217
+ left: 1.32rem;
218
+ }
219
+ .toggle[type="checkbox"]:checked {
220
+ background-color: #105652;
221
+ }
222
+ .toggle[type="checkbox"]:disabled {
223
+ opacity: 0.3;
224
+ cursor: not-allowed;
225
+ }
226
+ .toggle[type="checkbox"]:disabled + span {
227
+ opacity: 0.3;
228
+ cursor: not-allowed;
229
+ }
230
+
231
+ /* checkbox */
232
+ .check-box[type="checkbox"]:checked {
233
+ border-color: transparent;
234
+ background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5.707 7.293a1 1 0 0 0-1.414 1.414l2 2a1 1 0 0 0 1.414 0l4-4a1 1 0 0 0-1.414-1.414L7 8.586 5.707 7.293z'/%3e%3c/svg%3e");
235
+ background-size: 150%;
236
+ background-position: 50%;
237
+ background-repeat: no-repeat;
238
+ }
239
+ .check-box[type="checkbox"]:disabled {
240
+ background-color: #7f7f7f;
241
+ }
242
+ .box-shadow-green:hover {
243
+ box-shadow: 0px 0px 20px 0px rgba(16, 86, 82, 0.5);
244
+ }
245
+
246
+ .fade-enter {
247
+ opacity: 0;
248
+ }
249
+ .fade-enter-active {
250
+ opacity: 1;
251
+ transition: opacity 0.5s ease-in-out;
252
+ }
253
+ .fade-exit {
254
+ opacity: 1;
255
+ }
256
+ .fade-exit-active {
257
+ opacity: 0;
258
+ transition: opacity 0.5s ease-in-out;
259
+ }
260
+
261
+ .text-gradient-green-to-red {
262
+ background: var(
263
+ --gradient-main,
264
+ linear-gradient(269deg, #760023 0%, #105652 100%)
265
+ );
266
+ background-clip: text;
267
+ -webkit-background-clip: text;
268
+ -webkit-text-fill-color: transparent;
269
+ }
@@ -8,41 +8,44 @@ export default function One({ event }) {
8
8
  const timer = setInterval(() => setCurrentTime(new Date()), 1000);
9
9
  return () => clearInterval(timer);
10
10
  }, []);
11
- const button = () => ({
12
- sizes: "w-full h-12 flex items-center justify-center rounded-md text-white cursor-pointer font-bold gap-3 text-sm xs:text-md",
13
- backgrounds: "bg-gradient-to-l from-[#760023] to-[#105652]",
14
- });
15
11
  // 현재는 startedAt과 expiredAt 모두 시각은 09:00:00 으로 설정되어 있습니다.
16
12
  const startedAt = event.startedAt ? new Date(event.startedAt) : null;
17
13
  const expiredAt = event.expiredAt ? new Date(event.expiredAt) : null;
18
- let buttonContent = null;
19
- if (startedAt && expiredAt) {
20
- const timeDiff = startedAt.getTime() - currentTime.getTime();
21
- const daysRemaining = Math.floor(timeDiff / (1000 * 60 * 60 * 24));
22
- const hoursRemaining = Math.floor((timeDiff / (1000 * 60 * 60)) % 24);
23
- const minutesRemaining = Math.floor((timeDiff / (1000 * 60)) % 60);
24
- const secondsRemaining = Math.floor((timeDiff / 1000) % 60);
25
- if (startedAt < currentTime && currentTime < expiredAt) {
26
- buttonContent = (_jsx("div", { onClick: event.button?.onClick, className: cn(button()), children: event.button?.title }));
27
- }
28
- else if (currentTime < startedAt) {
29
- const countdownText = daysRemaining > 0
30
- ? `오픈까지 D-${daysRemaining}`
31
- : `오픈까지 ${hoursRemaining
32
- .toString()
33
- .padStart(2, "0")}:${minutesRemaining
34
- .toString()
35
- .padStart(2, "0")}:${secondsRemaining
36
- .toString()
37
- .padStart(2, "0")} 남음`;
38
- buttonContent = (_jsx("div", { className: "w-full h-12 flex items-center justify-center rounded-md bg-gray-light text-green-dark font-bold gap-3 text-sm xs:text-md", children: countdownText }));
39
- }
40
- else if (expiredAt < currentTime) {
41
- buttonContent = (_jsx("div", { className: "w-full h-12 flex items-center justify-center rounded-md bg-gray-light text-gray-medium font-bold gap-3 text-sm xs:text-md", children: "\uC774\uBCA4\uD2B8\uAC00 \uB9C8\uAC10\uB418\uC5C8\uC5B4\uC694" }));
42
- }
43
- }
44
- else {
45
- buttonContent = _jsx("div", { className: cn(button()), children: event.button?.title });
46
- }
47
- return (_jsxs("div", { className: "flex flex-col mmd:flex-row", children: [_jsx("div", { className: "min-w-[320px] h-auto p-5 mmd:sticky mmd:top-20 mmd:self-start", children: _jsxs("div", { className: "w-full h-auto rounded-xl sm:flex mmd:flex-col", children: [_jsx("div", { className: "w-full mmd:h-50 overflow-hidden", children: _jsx("img", { src: event.thumbnail, alt: "", className: "rounded-xl h-full object-cover w-full" }) }), _jsxs("div", { className: "w-full h-auto pt-5 sm:p-5 mmd:p-0 mmd:pt-5 gap-3 flex flex-col", children: [_jsx("div", { className: "flex items-center", children: _jsx(StatusText, { event: event }) }), _jsx("div", { className: "text-sm font-bold text-gray-dark flex items-center mb-2", children: event.title }), buttonContent] })] }, event.id) }), _jsxs("div", { className: "flex-grow p-5", children: [_jsx("div", { children: isHTMLString(event.content) ? (_jsx("div", { dangerouslySetInnerHTML: { __html: event.content }, className: "w-full rounded-xl object-cover overflow-hidden max-w-[810px]" })) : (_jsx("div", { children: event.content })) }), _jsx("button", { onClick: () => history.back(), className: "mt-8 p-5 bg-green-dark/5 text-green-dark rounded-xl flex items-center justify-center hover:bg-green-dark/20 transition-all", children: "\uBAA9\uB85D\uC73C\uB85C \uB3CC\uC544\uAC00\uAE30" })] })] }));
14
+ const timeDiff = startedAt
15
+ ? startedAt.getTime() - currentTime.getTime()
16
+ : expiredAt
17
+ ? expiredAt.getTime() - currentTime.getTime()
18
+ : 0;
19
+ const daysRemaining = Math.floor(timeDiff / (1000 * 60 * 60 * 24));
20
+ const hoursRemaining = Math.floor((timeDiff / (1000 * 60 * 60)) % 24);
21
+ const minutesRemaining = Math.floor((timeDiff / (1000 * 60)) % 60);
22
+ const secondsRemaining = Math.floor((timeDiff / 1000) % 60);
23
+ // NOTE: let 쓰지 마세요 없어도 코드 짜는데 문제 없습니다. 스코프 이슈 생기면 답없습니다.
24
+ // NOTE: 컴포넌트 내부에서 if else 쓰지 마세요 가독성 떨어지고 버그납니다. 예외처리는 함수로 빼서 처리하세요.
25
+ // NOTE: 절대 같은 코드 복붙하지마세요. 성능떨어지고 보기 안좋습니다.
26
+ const countdownText = daysRemaining > 0
27
+ ? `오픈까지 D-${daysRemaining}`
28
+ : `오픈까지 ${hoursRemaining
29
+ .toString()
30
+ .padStart(2, "0")}:${minutesRemaining
31
+ .toString()
32
+ .padStart(2, "0")}:${secondsRemaining
33
+ .toString()
34
+ .padStart(2, "0")} 남음`;
35
+ const button = {
36
+ sizes: "w-full h-12 flex items-center justify-center rounded-md cursor-pointer font-bold gap-3 text-sm xs:text-md",
37
+ backgrounds: expiredAt && expiredAt < currentTime
38
+ ? " bg-gray-light text-gray-medium"
39
+ : expiredAt && expiredAt > currentTime
40
+ ? "bg-gray-light text-green-dark"
41
+ : "bg-gradient-to-l from-[#760023] to-[#105652] text-white",
42
+ };
43
+ const buttonText = expiredAt && expiredAt < currentTime
44
+ ? "종료된 이벤트입니다"
45
+ : startedAt && startedAt > currentTime
46
+ ? countdownText
47
+ : event.button?.title;
48
+ return (_jsxs("div", { className: "flex flex-col mmd:flex-row", children: [_jsx("div", { className: "min-w-[320px] h-auto p-5 mmd:sticky mmd:top-20 mmd:self-start", children: _jsxs("div", { className: "w-full h-auto rounded-xl sm:flex mmd:flex-col", children: [_jsx("div", { className: "w-full mmd:h-50 overflow-hidden", children: _jsx("img", { src: event.thumbnail, alt: "", className: "rounded-xl h-full object-cover w-full" }) }), _jsxs("div", { className: "w-full h-auto pt-5 sm:p-5 mmd:p-0 mmd:pt-5 gap-3 flex flex-col", children: [_jsx("div", { className: "flex items-center", children: _jsx(StatusText, { event: event }) }), _jsx("div", { className: "text-sm font-bold text-gray-dark flex items-center mb-2", children: event.title }), event.button && (_jsx("div", { className: cn(button), onClick: () => {
49
+ event.button?.onClick && event.button.onClick();
50
+ }, children: buttonText }))] })] }, event.id) }), _jsxs("div", { className: "flex-grow p-5", children: [_jsx("div", { children: isHTMLString(event.content) ? (_jsx("div", { dangerouslySetInnerHTML: { __html: event.content }, className: "w-full rounded-xl object-cover overflow-hidden max-w-[810px]" })) : (_jsx("div", { children: event.content })) }), _jsx("button", { onClick: () => history.back(), className: "mt-8 p-5 bg-green-dark/5 text-green-dark rounded-xl flex items-center justify-center hover:bg-green-dark/20 transition-all", children: "\uBAA9\uB85D\uC73C\uB85C \uB3CC\uC544\uAC00\uAE30" })] })] }));
48
51
  }
@@ -6,7 +6,8 @@ interface Calendar {
6
6
  schedules: {
7
7
  onClick?: OnClick;
8
8
  title: string;
9
- applyDay: Date;
9
+ applyEnd: Date;
10
+ applyStart: Date;
10
11
  testStart: Date;
11
12
  testEnd?: Date;
12
13
  gradeOpen: Date;