Skip to content

Commit afb4f24

Browse files
authored
Merge pull request #91 from wafflestudio/hotfix/timetable
모바일 화면에서 시간표 올리지 못함 설명
2 parents a3d90a4 + eb4d9a0 commit afb4f24

8 files changed

Lines changed: 518 additions & 457 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
"dependencies": {
1919
"@tanstack/query-async-storage-persister": "^5.100.9",
20-
"@tanstack/react-query": "^5.100.9",
20+
"@tanstack/react-query": "^5.100.10",
2121
"@tanstack/react-query-persist-client": "^5.100.9",
2222
"axios": "^1.13.2",
2323
"date-fns": "^4.1.0",

src/pages/MyPage.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ const BugReportSection = () => {
233233
<section className={styles.bugReportSection}>
234234
<div className={styles.bugReportHeader}>
235235
<div className={styles.bugReportTitle}>
236-
<FaBug size={18} />
236+
<FaBug size={20} />
237237
<strong>버그 신고</strong>
238238
</div>
239239
<span>이용 중 발견한 문제를 알려주세요.</span>
@@ -382,10 +382,10 @@ const MyPage = () => {
382382
<div className={styles.widgetsWrapper}>
383383
<BookmarkWidget />
384384
<MemoWidget />
385+
<BugReportSection />
386+
<LogoutSection />
387+
<AccountDeletionSection />
385388
</div>
386-
<BugReportSection />
387-
<LogoutSection />
388-
<AccountDeletionSection />
389389
</div>
390390
) : (
391391
<div className={styles.notFound}>

src/pages/timetable/TimetablePage.tsx

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ import { SlArrowLeft } from "react-icons/sl";
2222
import { TimeTableSidebar } from "./TimeTableSidebar";
2323
import TimeTableToolbar from "./TimeTableToolbar";
2424
import BottomNav from "@/widgets/BottomNav";
25+
import { useAuth } from "@/contexts/AuthProvider";
26+
import { useNavigate } from "react-router-dom";
27+
import Modal from "@/widgets/Modal";
2528

2629
export default function TimetablePage() {
2730
const now = new Date();
@@ -58,6 +61,9 @@ export default function TimetablePage() {
5861
const [isSidebarOpen, setIsSidebarOpen] = useState(true);
5962
const [isTimetableSimplified, setIsTimetableSimplified] = useState(false);
6063

64+
const { user } = useAuth();
65+
const navigate = useNavigate();
66+
6167
useEffect(() => {
6268
loadTimetable(year, semester);
6369
}, [year, semester, loadTimetable]);
@@ -202,8 +208,14 @@ export default function TimetablePage() {
202208
선택된 시간표가 없어요
203209
</div>
204210
<div style={{ opacity: 0.7, lineHeight: 1.5 }}>
205-
왼쪽 사이드바에서 시간표를 추가하거나 선택해 주세요.
211+
<span className={styles.emptyDesktop}>
212+
왼쪽 사이드바에서 시간표를 추가하거나 선택해 주세요.
213+
</span>
214+
<span className={styles.emptyMobile}>
215+
시간표는 데스크탑 뷰에서 설정해주세요!
216+
</span>
206217
</div>
218+
207219
</div>
208220
) : (
209221
<TimetableGrid
@@ -239,6 +251,20 @@ export default function TimetablePage() {
239251
setIsClicked={setIsAddClassPanelOpen}
240252
/>
241253
)}
254+
255+
{!user &&
256+
<div className={styles.notFound}>
257+
<Modal
258+
content="시간표 페이지 이용을 위해서는 로그인을 해주세요."
259+
leftText="로그인"
260+
rightText="회원가입"
261+
onLeftClick={() => navigate("/auth/login")}
262+
onRightClick={() => navigate("/auth/signup")}
263+
onClose={null}
264+
/>
265+
</div>
266+
}
267+
242268
<BottomNav />
243269
</div>
244270
);

src/styles/Bookmarks.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ body {
3939
width: 100%;
4040
justify-content: space-between;
4141
align-items: center;
42-
padding: 0px;
42+
padding: 0 20px;
4343
margin-bottom: 16px;
4444
}
4545

src/styles/Memo.module.css

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,13 @@ body {
238238
.memoContent {
239239
font-size: 14px;
240240
}
241+
.memosHeader {
242+
padding: 0px;
243+
}
241244
.memosHeader span {
242245
font-size: 17px;
243246
}
244-
.memosHeader {
245-
padding: 0 0 0 10px;
246-
}
247+
247248
.cardsColumn {
248249
gap: 0;
249250
}

src/styles/MyPage.module.css

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,17 @@
4343
display: flex;
4444
flex-direction: column;
4545
width: 80%;
46+
box-sizing: border-box;
4647
}
4748

4849
.bugReportSection {
4950
display: flex;
5051
flex-direction: column;
5152
gap: 14px;
52-
width: 80%;
53-
margin-top: 24px;
54-
padding: 20px;
53+
width: 100%;
54+
padding: 24px 20px;
5555
border-top: 1px solid #eeeeee;
56+
box-sizing: border-box;
5657
}
5758

5859
.bugReportHeader {
@@ -69,8 +70,9 @@
6970
}
7071

7172
.bugReportTitle strong {
72-
font-size: 16px;
73+
font-size: 20px;
7374
font-weight: 700;
75+
line-height: 1.2;
7476
}
7577

7678
.bugReportHeader span {
@@ -159,10 +161,10 @@
159161
align-items: center;
160162
justify-content: space-between;
161163
gap: 16px;
162-
width: 80%;
163-
margin-top: 24px;
164-
padding: 20px;
164+
width: 100%;
165+
padding: 24px 20px;
165166
border-top: 1px solid #eeeeee;
167+
box-sizing: border-box;
166168
}
167169

168170
.logoutText {
@@ -174,8 +176,9 @@
174176

175177
.logoutText strong {
176178
color: #222222;
177-
font-size: 16px;
179+
font-size: 20px;
178180
font-weight: 700;
181+
line-height: 1.2;
179182
}
180183

181184
.logoutText span {
@@ -221,10 +224,10 @@
221224
align-items: center;
222225
justify-content: space-between;
223226
gap: 16px;
224-
width: 80%;
225-
margin-top: 24px;
226-
padding: 20px;
227+
width: 100%;
228+
padding: 24px 20px;
227229
border-top: 1px solid #eeeeee;
230+
box-sizing: border-box;
228231
}
229232

230233
.accountDeletionText {
@@ -236,8 +239,9 @@
236239

237240
.accountDeletionText strong {
238241
color: #222222;
239-
font-size: 16px;
242+
font-size: 20px;
240243
font-weight: 700;
244+
line-height: 1.2;
241245
}
242246

243247
.accountDeletionText span {
@@ -494,29 +498,28 @@
494498
padding: 24px 20px;
495499
}
496500
.bugReportSection {
497-
width: 100%;
498-
padding: 20px;
499-
margin-top: 8px;
501+
padding: 24px 0;
502+
}
503+
.bugReportTitle strong,
504+
.logoutText strong,
505+
.accountDeletionText strong {
506+
font-size: 17px;
500507
}
501508
.bugReportSubmitButton {
502509
width: 100%;
503510
}
504511
.logoutSection {
505-
width: 100%;
506512
align-items: flex-start;
507513
flex-direction: column;
508-
padding: 20px;
509-
margin-top: 8px;
514+
padding: 24px 0;
510515
}
511516
.logoutButton {
512517
width: 100%;
513518
}
514519
.accountDeletionSection {
515-
width: 100%;
516520
align-items: flex-start;
517521
flex-direction: column;
518-
padding: 20px;
519-
margin-top: 8px;
522+
padding: 24px 0;
520523
}
521524
.deleteAccountButton {
522525
width: 100%;

0 commit comments

Comments
 (0)