Skip to content

Commit

Permalink
refactor(#527): use usehooks-ts implementation of isMounted
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyckahn committed Dec 1, 2024
1 parent b8fe71e commit 72d110b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
4 changes: 2 additions & 2 deletions src/components/CowCard/CowCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import Typography from '@mui/material/Typography/index.js'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import classNames from 'classnames'
import { faMars, faVenus } from '@fortawesome/free-solid-svg-icons'
import { useIsMounted } from 'usehooks-ts'

import FarmhandContext from '../Farmhand/Farmhand.context.js'

Expand All @@ -34,7 +35,6 @@ import {
OFFER_COW_FOR_TRADE,
WITHDRAW_COW_FROM_TRADE,
} from '../../templates.js'
import { useMountState } from '../../hooks/useMountState/index.js'

import Subheader from './Subheader/index.js'

Expand Down Expand Up @@ -123,7 +123,7 @@ export const CowCard = (
isCowOfferedForTradeByPeer && cowIdOfferedForTrade.length > 0
)

const { isMounted } = useMountState()
const isMounted = useIsMounted()

useEffect(() => {
;(async () => {
Expand Down
1 change: 0 additions & 1 deletion src/hooks/useMountState/index.js

This file was deleted.

17 changes: 0 additions & 17 deletions src/hooks/useMountState/useMountState.js

This file was deleted.

0 comments on commit 72d110b

Please sign in to comment.