Repository navigation
투표 제작 시 투표 상세 페이지에서 게시글 공유 바텀시트 활성화 작업을 구현한다. #487
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ad34b9c
공유하기 바텀시트에 필요한 Share.png 추가
Jeongchanyeong 073b3d0
bottom sheet variant 중앙 배열 시 조건부 렌더링
Jeongchanyeong b240115
투표 생성시 올라오는 바텀시트 구현
Jeongchanyeong 7d4e0a6
투표 생성 버튼에 바텀시트 연결
Jeongchanyeong fe8d532
Update src/components/common/BottomSheet/BottomSheet.tsx
Jeongchanyeong 293f1fd
바텀시트 일관된 구조로 수정
Jeongchanyeong f16cd4f
pros명 직관적이게 수정
Jeongchanyeong 3daa6a9
props 수정
Jeongchanyeong 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
45 changes: 45 additions & 0 deletions
45
src/components/common/PollCreatedShareBottomSheet/PollCreatedShareBottomSheet.tsx
This file contains hidden or 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,45 @@ | ||
| import BottomSheet from '../BottomSheet'; | ||
| import { useBottomSheet } from '../BottomSheet/hooks'; | ||
| import { Button } from '../Button/Button'; | ||
| import useLinkShareBottomSheet from '../LinkShareBottomSheet/hooks'; | ||
| import shareImage from '@/assets/images/Share.png'; | ||
|
|
||
| interface PollCreatedShareBottomSheetProps { | ||
| shareUrl: string; | ||
| } | ||
|
|
||
| export default function PollCreatedShareBottomSheet({ | ||
| shareUrl, | ||
| }: PollCreatedShareBottomSheetProps) { | ||
| const { handleClickKakaoShareButton } = useLinkShareBottomSheet({ shareUrl }); | ||
| const { closeBottomSheet } = useBottomSheet(); | ||
|
|
||
| return ( | ||
| <BottomSheet title="투표가 만들어졌어요!" align="centered" hasCloseButton> | ||
| <div className="flex flex-col items-center text-center px-6"> | ||
| <img src={shareImage} alt="Share" className="w-[90px] h-[90px] mb-4" /> | ||
| <p className="text-headline-1 text-gray-500 mb-7"> | ||
| 투표를 공유하고 다양한 의견을 받아보세요. | ||
| </p> | ||
| <div className="flex flex-col w-full"> | ||
| <Button | ||
| type="button" | ||
| variant="solid" | ||
| size="large" | ||
| buttonType="primary" | ||
| onClick={handleClickKakaoShareButton} | ||
| className="flex items-center justify-center" | ||
| > | ||
| 카카오로 공유하기 | ||
| </Button> | ||
| <button | ||
| onClick={closeBottomSheet} | ||
| className="text-body-1 text-gray-700 underline underline-offset-4 text-center pt-3" | ||
| > | ||
| 나중에 하기 | ||
| </button> | ||
| </div> | ||
| </div> | ||
| </BottomSheet> | ||
| ); | ||
| } |
This file contains hidden or 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 @@ | ||
| export { default } from './PollCreatedShareBottomSheet'; |
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
기존엔
title을 받고, 나머지 컨텐츠를 children으로 전달하는 형태인데,
왜 center 케이스에는 description, topContent를 별도로 받는 형태로 설계하셨나요?
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.
음 기존 설계와 일관성이 떨어지긴 하네요. children으로 넘기는 형태로 수정하겠습니다.