Skip to content

Commit

Permalink
feat(comment): message popup style
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <tukon479@gmail.com>
  • Loading branch information
Innei committed Mar 27, 2023
1 parent 7a88b44 commit 9f48681
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"react-dom": "18.2.0",
"react-intersection-observer": "9.4.3",
"react-masonry-css": "1.0.16",
"react-message-popup": "1.1.1",
"react-message-popup": "1.1.3",
"react-shortcut-guide": "1.0.0",
"react-smooth-number-counter": "npm:@reactify-components/smooth-number-counter",
"react-toastify": "9.1.2",
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions src/components/widgets/Comment/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,17 @@ import styles from './index.module.css'
import { CommentLoading } from './loading'

export const openCommentMessage = async () => {
const { destory } = await message.loading({
const { next } = await message.loading({
content: '发送中',
duration: 20000,
duration: 3000,
})

return {
success: () => {
destory()
message.success({ content: '成功啦', duration: 2000 })
next('成功啦', 'success')
},
error: () => {
destory()
message.error({ content: '失败了,www', duration: 2000 })
next('失败了,www', 'error')
},
}
}
Expand Down

0 comments on commit 9f48681

Please sign in to comment.