-
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
Feat/공통 모달 스토어 및 북마크 모달 추가 #49
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🚀 Storybook 자동 배포 URL: https://6637bd73cba78215aa6e39fa-ffckwjqcxa.chromatic.com/ |
🚀 Storybook 자동 배포 URL: https://6637bd73cba78215aa6e39fa-mdwgxakyjq.chromatic.com/ |
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/components/Sidebar/index.tsx
Outdated
|
||
const Index = () => { | ||
const pathname = usePathname(); |
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.
p5;
pathName으로 수정 부탁드립니당!
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.
헉 다시 보니 usePathname이군요,,!
그래도 변수는 pathName으로 쓰는게 좋을까요,,(?)
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.
pathname, pathName 둘다 사용되는거 같더라구요...! 저희 컨벤션에 맞춰서 카멜케이스로 맞춰도 될거같아요!
return ( | ||
<div ref={modalRef} className='fixed top-0 left-0 bottom-0 right-0' onClick={handleCloseModal}> | ||
<div | ||
className={cn([ |
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.
p4;
혹시 성은님 이쪽에서 cn 쓰신 이유 있을까용??
한번에 className에 적는건 어떨까요?
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.
클래스가 길어지면서 가독성이 좋아 보이지 않아 보여 줄바꿈하기 위해서 작성했었습니다!
작성한거 보니깐 기준없이 나눠진거 같기는 하네요ㅠ 큰 이유는 없어서 변경해도 상관은없을거같아요!
|
||
if (!isModalOpen) return null; | ||
|
||
const el = document.getElementById('modal'); |
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.
p4;
el
네이밍 말구 modalElement 이런식으로 구체화해도 좋을 것 같습니다!
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.
네! 명확하게 어떤 요소인지 적는게 좋을거 같네요!
반영해놓겠습니다!
@@ -0,0 +1,141 @@ | |||
'use client'; |
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.
그러면 추후 다른 Modal 이 생길경우 이쪽에 Modal을 생성하는 것일까용??
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.
네! 처음 생각으로는 모달도 한곳에서 관리하면 좋을거 같아서 디렉토리를 만들었습니다!
아직 구조화가 된거 같지는 않아서 좋은 의견 있으시면 말씀해주세요!!
<ModalPortal> | ||
<div className='w-[432px]'> | ||
<div className='mb-24'> | ||
<h1 className='text-text heading-2xl-bd '>북마크 추가</h1> |
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.
p999;
맨 뒤 공백하나가 있습니당!!
@@ -0,0 +1,28 @@ | |||
// src/stores/modalStore.js | |||
import { create } from 'zustand'; |
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.
👍🏻 👍🏻 👍🏻 👍🏻 👍🏻 👍🏻
🚀 Storybook 자동 배포 URL: https://6637bd73cba78215aa6e39fa-ylmodxqoxz.chromatic.com/ |
📖 관련 문서
#47
✍🏻 변경사항:
createPortal을 사용하여 modal layout 구현했습니다
modalStore로 모달 관리하도록 추가했습니다
북마크 추가 모달 UI 구현
드래그 파일 업로드 hook 추가했습니다
모달 사용
🔍 확인할 목록