Skip to content

Commit

Permalink
refactor: catch error & max line for text (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
minh-rakuten authored Apr 15, 2021
1 parent b4ae0be commit 6c90205
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions js-miniapp-sample/src/pages/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ const Message = (props: MessageTypeProps) => {
show: true,
response: respMsg,
});
})
.catch((e) => {
setMessageResponse({
show: true,
response: e,
});
});
} else if (message.id === 2) {
props
Expand All @@ -150,6 +156,12 @@ const Message = (props: MessageTypeProps) => {
show: true,
response: respMsg,
});
})
.catch((e) => {
setMessageResponse({
show: true,
response: e,
});
});
} else if (message.id === 3) {
props
Expand All @@ -167,6 +179,12 @@ const Message = (props: MessageTypeProps) => {
show: true,
response: respMsg,
});
})
.catch((e) => {
setMessageResponse({
show: true,
response: e,
});
});
}
}
Expand Down Expand Up @@ -242,6 +260,7 @@ const Message = (props: MessageTypeProps) => {
onChange={onTextChange}
value={message.text}
multiline
rowsMax="4"
/>
</FormControl>
<FormControl className={classes.formControl}>
Expand Down

0 comments on commit 6c90205

Please sign in to comment.