-
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: 친구 페이지 친구 삭제, 내 초대코드 조회, 친구 추가 API 연동 #28
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
46901a6
chore: eslint @typescript-eslint/no-floating-promises off
hyeseon-han 3772493
feat: CheckIcon 추가, CheckBox component 생성
hyeseon-han 0cc095b
fix: Button component ButtonHTMLAttributes props추가
hyeseon-han 8c406fe
chore: 친구 페이지 헤더 우측 icon button component 분리
hyeseon-han 18b3904
feat: 친구 제거 API 연동
hyeseon-han e0930eb
style: 친구 페이지 스타일 수정
hyeseon-han 2e0488c
feat: 내 초대코드 조회 API 연동
hyeseon-han 50c2bd2
feat: WarningIcon 추가, WarningLine component 생성
hyeseon-han f684513
feat: 친구 추가 API 연동
hyeseon-han dcb64e5
Merge branch 'main' into MARA-79
hyeseon-han 7ea8153
fix: build error 수정
hyeseon-han 7876f5f
refactor: CheckBox refactoring
hyeseon-han b9f9fb7
refactor: 친구추가 성공, 초대코드 복사 성공시 토스트 메세지 상수화
hyeseon-han 15203f3
refactor: 내 초대코드 조회 query useGetMyInviteCode function으로 분리
hyeseon-han 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import React from 'react'; | ||
|
||
const CheckIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => ( | ||
<svg width="12" height="8" viewBox="0 0 12 8" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}> | ||
<path d="M1.3938 3.16216L5.02294 6.7913L10.6062 1.20801" stroke={props.stroke ? 'current' : '#F1F2F4'} strokeWidth="1.67" strokeLinecap="round"/> | ||
</svg> | ||
); | ||
export default CheckIcon; | ||
|
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,9 @@ | ||
import React from 'react'; | ||
|
||
const WarningIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => ( | ||
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}> | ||
<path fill={props.fill ? "current" : '#FB2414'} fillRule="evenodd" clipRule="evenodd" d="M12 6C12 9.31348 9.3137 12 6 12C2.6863 12 0 9.31348 0 6C0 2.68652 2.6863 0 6 0C9.3137 0 12 2.68652 12 6ZM6 2.6168C6.27671 2.6168 6.50101 2.84121 6.50101 3.11777V6.30527C6.50101 6.58184 6.27671 6.80625 6 6.80625C5.72329 6.80625 5.49899 6.58184 5.49899 6.30527V3.11777C5.49899 2.84121 5.72329 2.6168 6 2.6168ZM6 8.88223C6.27667 8.88223 6.50098 8.65781 6.50098 8.38125C6.50098 8.10469 6.27667 7.88027 6 7.88027C5.72329 7.88027 5.49899 8.10469 5.49899 8.38125C5.49899 8.65781 5.72329 8.88223 6 8.88223Z" /> | ||
</svg> | ||
); | ||
|
||
export default WarningIcon; |
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,18 @@ | ||
import { CheckIcon } from '@/assets/icons'; | ||
import React from 'react'; | ||
|
||
const CheckBox: React.FC<{ active: boolean; onClick: () => void }> = ({ | ||
active = false, | ||
onClick, | ||
}) => { | ||
const commonStyle = | ||
'flex justify-center items-center w-[20px] h-[20px] rounded-full'; | ||
const buttonClassName = `${commonStyle} ${active ? 'bg-primary2' : 'border border-gray5'}`; | ||
return ( | ||
<button onClick={onClick} className={buttonClassName}> | ||
<CheckIcon stroke={active ? '#F1F2F4' : '#9299AA'} /> | ||
</button> | ||
); | ||
}; | ||
|
||
export default CheckBox; |
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
14 changes: 14 additions & 0 deletions
14
src/components/molecules/FriendshipHeaderSettingButton.tsx
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,14 @@ | ||
import React from 'react'; | ||
import { SettingIcon } from '@/assets/icons'; | ||
|
||
const FriendshipHeaderSettingButton: React.FC<{ onClick: () => void }> = ({ | ||
onClick, | ||
}) => { | ||
return ( | ||
<button onClick={onClick}> | ||
<SettingIcon /> | ||
</button> | ||
); | ||
}; | ||
|
||
export default FriendshipHeaderSettingButton; |
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,13 @@ | ||
import React from 'react'; | ||
import { WarningIcon } from '@/assets/icons'; | ||
|
||
const WarningLine: React.FC<{ text: string }> = ({ text }) => { | ||
return ( | ||
<div className="flex items-center"> | ||
<WarningIcon /> | ||
<p className="ml-[4px] body2-regular text-point4">{text}</p> | ||
</div> | ||
); | ||
}; | ||
|
||
export default WarningLine; |
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
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.
이런 형태도 가능할 것 같네요..!🙇♂️
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.
분기 파편화 이슈가 생길까봐 고민 했었는데 공유 주신 코드가 훨씬 간결해보이네요 👍🏻☺️ 감사해요!🙇♀️
반영해두었습니다