This commit is contained in:
ingawei 2022-10-13 21:31:15 -07:00
parent 20acdb7c16
commit af5db56e34
2 changed files with 3 additions and 5 deletions

View File

@ -3,7 +3,6 @@ import { Contract } from 'common/contract'
import { User } from 'common/user'
import { useUserLikes } from 'web/hooks/use-likes'
import toast from 'react-hot-toast'
import { formatMoney } from 'common/util/format'
import { likeContract } from 'web/lib/firebase/likes'
import { LIKE_TIP_AMOUNT, TIP_UNDO_DURATION } from 'common/like'
import { firebaseLogin } from 'web/lib/firebase/users'
@ -40,7 +39,7 @@ export function LikeMarketButton(props: {
likeContract(user, contract).catch(() => setIsLiking(false))
}, 3000)
toast.custom(
(t) => (
() => (
<TipToast
userName={contract.creatorUsername}
onUndoClick={() => {

View File

@ -1,6 +1,5 @@
import { useEffect, useRef, useState } from 'react'
import { useState } from 'react'
import toast from 'react-hot-toast'
import { debounce } from 'lodash'
import { Comment } from 'common/comment'
import { User } from 'common/user'
@ -69,7 +68,7 @@ export function Tipper(prop: {
me && saveTip(me, comment, delta)
}, 3000)
toast.custom(
(t) => (
() => (
<TipToast
userName={comment.userName}
onUndoClick={() => {