Skip to content

Commit

Permalink
Merge pull request #4850 from thematters/fix-universal-auth-trigger
Browse files Browse the repository at this point in the history
fix: correct universal auth trigger
  • Loading branch information
wlliaml authored Sep 5, 2024
2 parents fed7f54 + 3e32ab1 commit 0227c9e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/common/enums/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ export enum UNIVERSAL_AUTH_TRIGGER {
visitorWall = 'visitorWall',
momentComment = 'momentComment',
momentLike = 'momentLike',
applyCampaign = 'applyCampaign',
collectionLike = 'collectionLike',
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/components/Comment/FooterActions/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const BaseFooterActions = ({
onClick = () => {
window.dispatchEvent(
new CustomEvent(OPEN_UNIVERSAL_AUTH_DIALOG, {
detail: { trigger: UNIVERSAL_AUTH_TRIGGER.collectArticle },
detail: { trigger: UNIVERSAL_AUTH_TRIGGER.comment },
})
)
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Forms/ArticleCommentForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export const ArticleCommentForm: React.FC<ArticleCommentFormProps> = ({
event.preventDefault()
window.dispatchEvent(
new CustomEvent(OPEN_UNIVERSAL_AUTH_DIALOG, {
detail: { trigger: UNIVERSAL_AUTH_TRIGGER.collectArticle },
detail: { trigger: UNIVERSAL_AUTH_TRIGGER.comment },
})
)
return
Expand Down Expand Up @@ -278,7 +278,7 @@ export const ArticleCommentForm: React.FC<ArticleCommentFormProps> = ({
onClick={() => {
window.dispatchEvent(
new CustomEvent(OPEN_UNIVERSAL_AUTH_DIALOG, {
detail: { trigger: UNIVERSAL_AUTH_TRIGGER.collectArticle },
detail: { trigger: UNIVERSAL_AUTH_TRIGGER.comment },
})
)
}}
Expand Down
2 changes: 1 addition & 1 deletion src/views/CampaignDetail/Apply/Button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const ApplyCampaignButton = ({
onClick = () => {
window.dispatchEvent(
new CustomEvent(OPEN_UNIVERSAL_AUTH_DIALOG, {
detail: { trigger: UNIVERSAL_AUTH_TRIGGER.replyComment },
detail: { trigger: UNIVERSAL_AUTH_TRIGGER.applyCampaign },
})
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const CollectionProfile = ({ collection }: CollectionProfileProps) => {
onClick = () => {
window.dispatchEvent(
new CustomEvent(OPEN_UNIVERSAL_AUTH_DIALOG, {
detail: { trigger: UNIVERSAL_AUTH_TRIGGER.collectArticle },
detail: { trigger: UNIVERSAL_AUTH_TRIGGER.collectionLike },
})
)
}
Expand Down

0 comments on commit 0227c9e

Please sign in to comment.