Skip to content

Commit

Permalink
feat: debug InputCTASection error message
Browse files Browse the repository at this point in the history
  • Loading branch information
jinhojang6 committed Jan 31, 2025
1 parent 3527592 commit 13626bc
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ export const InputCTASection: React.FC<InputCTASectionProps & Props> = ({
)

const data = await res.json()
console.log(data)
if (data?.result?.errors && data?.result?.errors[0]?.context?.length) {
setMessage(data?.result?.errors[0].context[0].message)
return
}

setMessage('Thank you for subscribing!')
} catch (error) {
console.log(error)
Expand Down

0 comments on commit 13626bc

Please sign in to comment.