Skip to content

[#42] width 브레이커 설정 #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion apps/client/src/pages/HomePage/HomePage.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Banner, HomeHeader, WorkspaceModal, WorkspaceSection } from '@/widgets';
import { Banner, HomeHeader, WidthBreaker, WorkspaceModal, WorkspaceSection } from '@/widgets';
import { useClassBlockStore, useLoadingStore, useWorkspaceStore } from '@/shared/store';

import { Loading } from '@/shared/ui';
Expand Down Expand Up @@ -29,6 +29,7 @@ export const HomePage = () => {
<WorkspaceSection />
<WorkspaceModal />
</div>
<WidthBreaker />
</>
);
};
19 changes: 19 additions & 0 deletions apps/client/src/widgets/common/WidthBreaker/WidthBreaker.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { useWindowSize } from '@/shared/hooks';

export const WidthBreaker = () => {
const { screenWidth } = useWindowSize();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 hook이 쓰일 줄이야..ㅎㅎ


return (
<>
{screenWidth < 1230 ? (
<div className="fixed inset-0 z-50 flex h-full w-full items-center justify-center bg-gray-50/70 backdrop-blur-sm">
<span className="text-bold-lg text-gray-950">
PC 환경(너비 1230px 이상)에서만 접근 가능한 서비스입니다.
</span>
</div>
) : (
<></>
)}
</>
);
};
2 changes: 2 additions & 0 deletions apps/client/src/widgets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ export { CssPropsSelectBox } from './workspace/css/CssPropsSelectBox/CssPropsSel
export { CssOptionItemList } from './workspace/css/CssOptionItemList/CssOptionItemList';
export { CssPropsSelectBoxHeader } from './workspace/css/CssPropsSelectBoxHeader/CssPropsSelectBoxHeader';
export { ImageTagModal } from './workspace/ImageTagModal/ImageTagModal';

export { WidthBreaker } from './common/WidthBreaker/WidthBreaker';