Skip to content

Commit

Permalink
앱 외부에서도 스크랩이 가능하도록 옵션 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
guswl98 committed Nov 29, 2024
1 parent f063c15 commit 834894e
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions packages/tds-widget/src/scrap/use-scrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ export function useScrap() {
scraped === currentState
? scrapsCount
: currentState
? scrapsCount + 1
: scrapsCount - 1,
? scrapsCount + 1
: scrapsCount - 1,
}
},
[scraps, updating],
Expand All @@ -85,7 +85,8 @@ export function useScrap() {
content_type: type,
},
},
}: Target) => {
scrapableInApp = true,
}: Target & { scrapableInApp?: boolean }) => {
if (
beforeScrapedChange &&
beforeScrapedChange({ id, type }, true) === false
Expand All @@ -97,7 +98,7 @@ export function useScrap() {
return
}

if (!app) {
if (scrapableInApp && !app) {
return showAppInstallCtaModal({ triggeredEventAction: 'POI저장' })
}

Expand Down Expand Up @@ -144,7 +145,8 @@ export function useScrap() {
content_type: type,
},
},
}: Target) => {
scrapableInApp = true,
}: Target & { scrapableInApp?: boolean }) => {
if (
beforeScrapedChange &&
beforeScrapedChange({ id, type }, true) === false
Expand All @@ -156,7 +158,7 @@ export function useScrap() {
return
}

if (!app) {
if (scrapableInApp && !app) {
return showAppInstallCtaModal({ triggeredEventAction: 'POI저장' })
}

Expand Down

0 comments on commit 834894e

Please sign in to comment.