-
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: 가게 세부 페이지 찜버튼 추가 #68
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
85192db
feat: 가게 세부 페이지 찜버튼 추가
l-lyun f61cf18
style: 타입 파일 폴더 이동
l-lyun 6060bad
fix: api 코드 분리
l-lyun 046b809
fix: tsc error
l-lyun e458d4a
fix: tsc error number to string
l-lyun 3fea2a3
fix: merge main
l-lyun 715a29d
fix: 찜 api 통합 대응
l-lyun 9c697c2
fix: 미사용 더미 삭제
l-lyun ae2c9ff
fix: CommonResponseType.ts 삭제
l-lyun 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
123 changes: 0 additions & 123 deletions
123
ios/ClientApp.xcworkspace/xcshareddata/swiftpm/Package.resolved
This file was deleted.
Oops, something went wrong.
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,32 @@ | ||
import React from 'react'; | ||
import {TouchableOpacity} from 'react-native'; | ||
import Icon from 'react-native-vector-icons/AntDesign'; | ||
import {updateMarketLike} from '@/apis'; | ||
|
||
type SubscribeIconProps = { | ||
marketIsLiked: boolean; | ||
marketId?: number; | ||
handleSubscribe: () => void; | ||
}; | ||
|
||
const SubscribeIcon = ({ | ||
marketIsLiked, | ||
marketId, | ||
handleSubscribe, | ||
}: SubscribeIconProps) => { | ||
const handleLikePress = async () => { | ||
if (marketId !== undefined) { | ||
const response = await updateMarketLike(marketId); | ||
if (response) { | ||
handleSubscribe(); | ||
} | ||
} | ||
}; | ||
return ( | ||
<TouchableOpacity onPress={handleLikePress}> | ||
<Icon name={marketIsLiked ? 'heart' : 'hearto'} size={24} /> | ||
</TouchableOpacity> | ||
); | ||
}; | ||
|
||
export default SubscribeIcon; |
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 |
---|---|---|
|
@@ -8,4 +8,7 @@ export type MarketType = { | |
address: string; | ||
products: ProductType[]; | ||
images: string[]; | ||
hasLike: boolean; | ||
// TODO: 논의 필요 | ||
marketId?: number; | ||
Comment on lines
+12
to
+13
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. id는 아마도 string 일것같아요 |
||
}; |
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.
✅