-
Notifications
You must be signed in to change notification settings - Fork 44
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
[박상준] Week14 #453
Merged
o-seung-yeon
merged 23 commits into
codeit-bootcamp-frontend:part3-박상준
from
sj0724:part3-박상준-week14
May 22, 2024
The head ref may contain hidden characters: "part3-\uBC15\uC0C1\uC900-week14"
Merged
[박상준] Week14 #453
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
6c0e520
feat: 로그인 회원가입 페이지 수정
sj0724 350499f
feat: 유저 id정보 context로 공유
sj0724 9792340
feat: 로그인 api추가, 토큰 로컬스토리지 저장
sj0724 6e5f12b
feat: 토큰으로 로그인 기능 구현
sj0724 babb6cb
feat: 로그인 기능 구현
sj0724 97babbd
feat: 로그아웃 기능 추가
sj0724 b0ed51d
feat: 회원가입 기능 구현
sj0724 94f2d2e
fix: 로그인전 페이지 이동시 로그인 페이지로 이동 및 css 수정
sj0724 049aa3d
fix: 모달 에러 메세지 추가 및 css 수정
sj0724 c3a8163
fix: 인풋 옵저버 영역 css 수정
sj0724 c4867c1
feat: 파일 추가 api 연동
sj0724 071bdcc
feat: 폴더 삭제기능 구현
sj0724 9c6ab07
fix: kebab메뉴 로직 kebab 컴포넌트로 이돟ㅇ
sj0724 445af50
fix: 메인 페이지 card 이미지 코드 수정
sj0724 5dd36c1
fix: 폴더 모달 버튼 컴포넌트로 변경 및 모달 로직 수정
sj0724 e9350fd
fix: 폴더 id, name state 통합
sj0724 445c1ab
fix: 검색바 이미지 삼항연산자로 변경
sj0724 05541dd
feat: 링크 추가 기능 구현 및 날짜 구현로직 수정, 케밥에서 링크 추가 기능 구현중
sj0724 0b76147
fix: 케밥에서 링크 추가 기능 구현 완료
sj0724 b2ff729
feat: 링크 삭제기능 구현 및 addlink 모달 수정
sj0724 78bc723
fix: 날짜 계산 함수 수정
sj0724 3717a86
fix: document 파일 수정 및 react-hook-form 구현중
sj0724 666c40c
feat: 로그인, 회원가입 react-hook-form으로 변경
sj0724 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const FolderModal = styled.div` | ||
display: flex; | ||
align-items: center; | ||
gap: 1.2rem; | ||
`; | ||
|
||
export const FolderModalIcon = styled.div` | ||
cursor: pointer; | ||
display: flex; | ||
align-items: center; | ||
gap: 0.4rem; | ||
color: var(--Linkbrary-gray60); | ||
font-size: 1.4rem; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import Image from 'next/image'; | ||
import { ReactNode } from 'react'; | ||
import * as S from './FolderModals.styled'; | ||
import { useModal } from '@/contexts/ModalContext'; | ||
import ModalPortal from '@/Portal'; | ||
import ShareModal from '../Modal/ShareModal/ShareModal'; | ||
import EditModal from '../Modal/EditModal/EditModal'; | ||
import DeleteModal from '../Modal/DeleteModal/DeleteModal'; | ||
|
||
function FolderIcon({ | ||
image, | ||
children, | ||
onOpen, | ||
state, | ||
}: { | ||
image: string; | ||
children: ReactNode; | ||
onOpen: (modalName: string) => void; | ||
state: string; | ||
}) { | ||
return ( | ||
<S.FolderModalIcon onClick={() => onOpen(`${state}`)}> | ||
<Image src={image} alt={`${image}`} width={20} height={20} /> | ||
{children} | ||
</S.FolderModalIcon> | ||
); | ||
} | ||
Comment on lines
+10
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 가급적 컴포넌트 파일 하나엔 하나의 컴포넌트 함수만 있도록 하거나, 최소한 파일명에 해당하는 컴포넌트를 위쪽에 배치하는게 좋을 것 같습니당 |
||
|
||
function FolderModals({ id, name }: { id: number; name: string }) { | ||
const { modalState, openModal, closeModal } = useModal(); | ||
|
||
return ( | ||
<S.FolderModal> | ||
<FolderIcon image="/share.svg" onOpen={openModal} state={'share'}> | ||
공유 | ||
</FolderIcon> | ||
<FolderIcon image="/pen.svg" onOpen={openModal} state={'edit'}> | ||
이름 변경 | ||
</FolderIcon> | ||
<FolderIcon image="/Group36.svg" onOpen={openModal} state={'delete'}> | ||
삭제 | ||
</FolderIcon> | ||
{modalState.share && ( | ||
<ModalPortal> | ||
<ShareModal folderName={name} /> | ||
</ModalPortal> | ||
)} | ||
{modalState.edit && ( | ||
<ModalPortal> | ||
<EditModal /> | ||
</ModalPortal> | ||
)} | ||
{modalState.delete && ( | ||
<ModalPortal> | ||
<DeleteModal folderName={name} folderId={id} /> | ||
</ModalPortal> | ||
)} | ||
</S.FolderModal> | ||
); | ||
} | ||
|
||
export default FolderModals; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
잘 반영해주셨는데요!
props 로
setOnSelect
->onSelect: ({id, name}: {id: string; name: string}) => void;
요렇게 넘겨주면 어떨까요?
상태를 업데이트 한다는 지식을 이 컴포넌트가 갖지 않도록요~