Move back to M
This commit is contained in:
parent
162b4094a9
commit
4617189514
|
@ -5,4 +5,4 @@ export type Like = {
|
||||||
createdTime: number
|
createdTime: number
|
||||||
tipTxnId?: string
|
tipTxnId?: string
|
||||||
}
|
}
|
||||||
export const LIKE_TIP_AMOUNT = 2
|
export const LIKE_TIP_AMOUNT = 5
|
||||||
|
|
|
@ -8,6 +8,8 @@ import toast from 'react-hot-toast'
|
||||||
import { formatMoney } from 'common/util/format'
|
import { formatMoney } from 'common/util/format'
|
||||||
import { likeContract, unLikeContract } from 'web/lib/firebase/likes'
|
import { likeContract, unLikeContract } from 'web/lib/firebase/likes'
|
||||||
import { LIKE_TIP_AMOUNT } from 'common/like'
|
import { LIKE_TIP_AMOUNT } from 'common/like'
|
||||||
|
import { Col } from 'web/components/layout/col'
|
||||||
|
import clsx from 'clsx'
|
||||||
|
|
||||||
export function LikeMarketButton(props: {
|
export function LikeMarketButton(props: {
|
||||||
contract: Contract
|
contract: Contract
|
||||||
|
@ -33,16 +35,21 @@ export function LikeMarketButton(props: {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
size={'md'}
|
size={'lg'}
|
||||||
className={'mb-1'}
|
className={'mb-1'}
|
||||||
color={'gray-white'}
|
color={'gray-white'}
|
||||||
onClick={onLike}
|
onClick={onLike}
|
||||||
>
|
>
|
||||||
{likedContractIds?.includes(contract.id) ? (
|
<Col className={'items-center justify-center'}>
|
||||||
<HeartIcon className="h-6 w-6 fill-red-500 text-red-500" />
|
<HeartIcon
|
||||||
) : (
|
className={clsx(
|
||||||
<HeartIcon className="h-6 w-6 text-gray-500" />
|
'h-6 w-6',
|
||||||
)}
|
likedContractIds?.includes(contract.id)
|
||||||
|
? 'fill-red-500 text-red-500'
|
||||||
|
: ''
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
</Button>
|
</Button>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user