Skip to content

Commit

Permalink
fix: #11 width, height 단위 변경, React memo 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
donghunee committed Jul 7, 2024
1 parent 5097629 commit 2b25cf1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/component/common/modal/Modal.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import ModalPortal from "@/component/common/modal/ModalPortal";
import { css } from "@emotion/react";
import { memo, useEffect, useRef } from "react";
import { ReactNode, memo, useEffect, useRef } from "react";

Check failure on line 3 in src/component/common/modal/Modal.tsx

View workflow job for this annotation

GitHub Actions / build

'memo' is declared but its value is never read.

interface Props {
isModalOpen: boolean;
onClose: () => void;
children?: React.ReactNode;
children?: ReactNode;
}

function Modal({ onClose, isModalOpen, children }: Props) {
Expand All @@ -32,6 +32,7 @@ function Modal({ onClose, isModalOpen, children }: Props) {
if (!isModalOpen) return null;

return (
// FIXME: 추후 디자인 토큰 연동 후 컬러 값 변경
<ModalPortal>
<div
css={css`
Expand All @@ -40,8 +41,8 @@ function Modal({ onClose, isModalOpen, children }: Props) {
left: 0;
right: 0;
bottom: 0;
width: 100vw;
height: 100dvh;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.4);
display: flex;
justify-content: center;
Expand All @@ -66,4 +67,4 @@ function Modal({ onClose, isModalOpen, children }: Props) {
);
}

export default memo(Modal);
export default Modal;

0 comments on commit 2b25cf1

Please sign in to comment.