Memoize recommended contracts widget
This commit is contained in:
parent
732656049b
commit
024f03af6d
|
@ -1,4 +1,4 @@
|
||||||
import React, { useEffect, useMemo, useState } from 'react'
|
import React, { memo, useEffect, useMemo, useState } from 'react'
|
||||||
import { ArrowLeftIcon } from '@heroicons/react/outline'
|
import { ArrowLeftIcon } from '@heroicons/react/outline'
|
||||||
|
|
||||||
import { useContractWithPreload } from 'web/hooks/use-contract'
|
import { useContractWithPreload } from 'web/hooks/use-contract'
|
||||||
|
@ -269,6 +269,7 @@ export function ContractPageContent(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const RecommendedContractsWidget = memo(
|
||||||
function RecommendedContractsWidget(props: { contract: Contract }) {
|
function RecommendedContractsWidget(props: { contract: Contract }) {
|
||||||
const { contract } = props
|
const { contract } = props
|
||||||
const user = useUser()
|
const user = useUser()
|
||||||
|
@ -292,3 +293,4 @@ function RecommendedContractsWidget(props: { contract: Contract }) {
|
||||||
</Col>
|
</Col>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user