Skip to content

Commit 17d600e

Browse files
author
ozen0718
committed
PUll
2 parents ddfd43f + 0b32def commit 17d600e

File tree

12 files changed

+48
-12
lines changed

12 files changed

+48
-12
lines changed

src/components/Layouts/DashboardLayout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const DashboardLayout = ({
1616
dashboardId,
1717
}: DashboardLayoutProps) => {
1818
return (
19-
<div className="flex h-screen overflow-hidden">
19+
<div className="flex h-[calc(var(--vh)_*_100)] overflow-hidden">
2020
<SideMenu teamId={TEAM_ID} dashboardList={dashboardList} />
2121
<div className="flex flex-col flex-1">
2222
<HeaderDashboard variant="dashboard" dashboardId={dashboardId} />

src/components/button/GuestModeButton.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export default function GuestModeButton() {
2424
router.push("/mydashboard");
2525
toast.success("게스트 모드로 로그인되었습니다.");
2626
} catch (error) {
27+
console.error("게스트 로그인 실패:", error);
2728
toast.error("게스트 로그인에 실패했습니다.");
2829
}
2930
};

src/components/sideMenu/SideMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export default function SideMenu({
6565
return (
6666
<aside
6767
className={clsx(
68-
"z-20 flex flex-col h-screen overflow-y-auto lg:overflow-y-hidden overflow-x-hidden transition-all duration-200",
68+
"z-20 flex flex-col h-[calc(var(--vh)_*_100)] overflow-y-auto lg:overflow-y-hidden overflow-x-hidden transition-all duration-200",
6969
"bg-white border-r border-[var(--color-gray3)] py-5",
7070
isCollapsed
7171
? "w-[67px] items-center px-0"

src/lib/dashboardOrderDB.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// src/lib/dashboardOrderDB.ts
21
import Dexie from "dexie";
32

43
// DB 인스턴스 생성

src/pages/404.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default function Custom404() {
1717
}, [router]);
1818

1919
return (
20-
<div className="flex flex-col items-center justify-center text-center h-screen bg-[var(--color-gray5)] gap-2">
20+
<div className="flex flex-col items-center justify-center text-center h-[calc(var(--vh)_*_100)] bg-[var(--color-gray5)] gap-2">
2121
<h1 className="font-24b text-[var(--primary)]">404 Not Found</h1>
2222
<p className="font-16r text-black3">페이지를 찾을 수 없습니다.</p>
2323
<p className="font-16r text-black3">5초 후 홈페이지로 이동합니다.</p>

src/pages/_app.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,21 @@ export default function App({ Component, pageProps }: AppPropsWithLayout) {
4747
initializeUser();
4848
}, []);
4949

50+
// 윈도우 기준 높이 사용
51+
useEffect(() => {
52+
const setVH = () => {
53+
const vh = window.innerHeight * 0.01;
54+
document.documentElement.style.setProperty("--vh", `${vh}px`);
55+
};
56+
57+
setVH();
58+
window.addEventListener("resize", setVH);
59+
60+
return () => {
61+
window.removeEventListener("resize", setVH);
62+
};
63+
}, []);
64+
5065
const router = useRouter();
5166
const pathname = router.pathname;
5267

src/pages/dashboard/[dashboardId]/edit.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { getDashboards } from "@/api/dashboards";
1111
import DeleteDashboardModal from "@/components/modal/DeleteDashboardModal";
1212
import { DashboardType } from "@/types/task";
1313
import { TEAM_ID } from "@/constants/team";
14+
import LoadingSpinner from "@/components/common/LoadingSpinner";
1415

1516
export default function EditDashboard() {
1617
const router = useRouter();
@@ -47,8 +48,12 @@ export default function EditDashboard() {
4748
}
4849
}, [isInitialized, user]);
4950

51+
if (!isInitialized || !user) {
52+
return <LoadingSpinner />;
53+
}
54+
5055
return (
51-
<div className="flex h-screen overflow-hidden">
56+
<div className="flex h-[calc(var(--vh)_*_100)] overflow-hidden">
5257
<SideMenu
5358
teamId={TEAM_ID}
5459
dashboardList={dashboardList}

src/pages/dashboard/[dashboardId]/index.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import ColumnsButton from "@/components/button/ColumnsButton";
1818
import AddColumnModal from "@/components/columnCard/AddColumnModal";
1919
import { TEAM_ID } from "@/constants/team";
2020
import { toast } from "react-toastify";
21+
import LoadingSpinner from "@/components/common/LoadingSpinner";
2122

2223
export default function Dashboard() {
2324
const router = useRouter();
@@ -100,8 +101,12 @@ export default function Dashboard() {
100101
(db) => db.id === Number(dashboardId)
101102
);
102103

104+
if (!isInitialized || !user) {
105+
return <LoadingSpinner />;
106+
}
107+
103108
return (
104-
<div className="flex h-screen min-h-screen">
109+
<div className="flex h-[calc(var(--vh)_*_100)]">
105110
<SideMenu
106111
teamId={TEAM_ID}
107112
dashboardList={dashboardList}

src/pages/login.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default function LoginPage() {
4444
};
4545

4646
return (
47-
<div className="flex flex-col items-center justify-center h-screen bg-white py-10">
47+
<div className="flex flex-col items-center justify-center h-[calc(var(--vh)_*_100)] bg-white py-10">
4848
<div className="flex flex-col items-center justify-center mb-[30px]">
4949
<Image
5050
src="/svgs/main-logo.svg"

src/pages/mydashboard.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import { DeleteModal } from "@/components/modal/DeleteModal";
1313
import { TEAM_ID } from "@/constants/team";
1414
import { Search } from "lucide-react";
1515
import { toast } from "react-toastify";
16+
import LoadingSpinner from "@/components/common/LoadingSpinner";
17+
1618
import {
1719
DndContext,
1820
closestCenter,
@@ -149,8 +151,12 @@ export default function MyDashboardPage() {
149151
});
150152
};
151153

154+
if (!isInitialized || !user) {
155+
return <LoadingSpinner />;
156+
}
157+
152158
return (
153-
<div className="flex h-screen overflow-hidden bg-[var(--color-violet5)]">
159+
<div className="flex h-[calc(var(--vh)_*_100)] overflow-hidden bg-[var(--color-violet5)]">
154160
<SideMenu
155161
teamId={TEAM_ID}
156162
dashboardList={dashboardList}

0 commit comments

Comments
 (0)