-
Notifications
You must be signed in to change notification settings - Fork 0
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
feature: 메인 페이지 퍼블리싱 #22
Conversation
Thanks for the contribution! Please review the labels and make any necessary changes. |
6910468
to
4d1cb54
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아직 메인 페이지 실행 & 확인을 못해가지구 고것만 확인해보고 리뷰 이어서 할게!
src/hooks/useDrawer.ts
Outdated
@@ -0,0 +1,15 @@ | |||
import { useState } from 'react'; | |||
|
|||
export function useDrawer() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
옹 요정도도 훅으로 빼는구나..?? drawer가 여러군데 쓰이면 이렇게 해도될 거 같은데 아니라면 이렇게까지 할 필요는 없을듯!
아니면 아예 공용으로 사용할 수 있도록 빼는 건 어때? ex. useToggle
import { useState, useCallback } from 'react';
function useToggle(initStatus = false) {
const [value, setValue] = useState(initStatus);
const toggle = useCallback(() => setValue((prevValue) => !prevValue), []);
return [value, toggle, setValue];
}
export default useToggle;
// 사용단 :
// const [isOpen, toggle] = useToggle(false);
// const openDrawer = () => toggle(true)
// const closeDrawer = () => toggle(false)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오 너무 좋은데? 완전 DDb 👍
|
||
useEffect(() => { | ||
if (isOpen) { | ||
setTimeout(() => setMounted(true), WAIT_DURATION); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기서는 상수 1개밖에 없어서 뺄 필요가 없긴 하지만 우리 상수 관리는 어떻게 할까?
Drawer.contstants.js 요런식으로 빼는것도 괜찮을듯?
유틸은 Drawer.utils.js 요런식으로 이름 맞춰서 빼는 것도 좋을 거 같아엽
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아하 맞네맞네 component.constants.js, **.utls.js 그 방식으로 하고 여러군데서 쓰이는거면 utils 폴더에 파일 만들어서 써도 좋을듯!
저렇게 한개만 있는건 안뺄게!
</div> | ||
<div className='tw-flex tw-gap-2.5 tw-overflow-x-scroll tw-scrollbar-hide'> | ||
{srcs.map((photo, idx) => ( | ||
<div key={idx} className='tw-aspect-[3/4] tw-h-[250px] tw-bg-grayscale-400' /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요기는 나중에 내 PR 합쳐지고 나서 그때 너가 만들어준 ImageFrame 사용하면 좋을듯??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
맞어 아무래도 merge되면 ImageFrame 쓸려고 했음 :)
리뷰반영: 범용적으로 사용가능하도록 수정
내 PR 합치면서 충돌난거 수정해뒀고 동작 잘되는거 확인 완! 합치면 될듯해요 :) |
👀 What is this PR?
메인 페이지 뷰 작업을 했슴다. 👍
📝 Changes
📌 Related issue(s)
📷 Attachment(optional)