Skip to content

Commit 9d294fe

Browse files
authored
✨ feat: width 브레이커 추가 (#43)
1 parent 1bc761c commit 9d294fe

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

apps/client/src/pages/HomePage/HomePage.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Banner, HomeHeader, WorkspaceModal, WorkspaceSection } from '@/widgets';
1+
import { Banner, HomeHeader, WidthBreaker, WorkspaceModal, WorkspaceSection } from '@/widgets';
22
import { useClassBlockStore, useLoadingStore, useWorkspaceStore } from '@/shared/store';
33

44
import { Loading } from '@/shared/ui';
@@ -29,6 +29,7 @@ export const HomePage = () => {
2929
<WorkspaceSection />
3030
<WorkspaceModal />
3131
</div>
32+
<WidthBreaker />
3233
</>
3334
);
3435
};
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { useWindowSize } from '@/shared/hooks';
2+
3+
export const WidthBreaker = () => {
4+
const { screenWidth } = useWindowSize();
5+
6+
return (
7+
<>
8+
{screenWidth < 1230 ? (
9+
<div className="fixed inset-0 z-50 flex h-full w-full items-center justify-center bg-gray-50/70 backdrop-blur-sm">
10+
<span className="text-bold-lg text-gray-950">
11+
PC 환경(너비 1230px 이상)에서만 접근 가능한 서비스입니다.
12+
</span>
13+
</div>
14+
) : (
15+
<></>
16+
)}
17+
</>
18+
);
19+
};

apps/client/src/widgets/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ export { CssPropsSelectBox } from './workspace/css/CssPropsSelectBox/CssPropsSel
1818
export { CssOptionItemList } from './workspace/css/CssOptionItemList/CssOptionItemList';
1919
export { CssPropsSelectBoxHeader } from './workspace/css/CssPropsSelectBoxHeader/CssPropsSelectBoxHeader';
2020
export { ImageTagModal } from './workspace/ImageTagModal/ImageTagModal';
21+
22+
export { WidthBreaker } from './common/WidthBreaker/WidthBreaker';

0 commit comments

Comments
 (0)