Skip to content

Commit

Permalink
mv util
Browse files Browse the repository at this point in the history
  • Loading branch information
bigboydiamonds committed Sep 12, 2024
1 parent 080c5ff commit 1c5414f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { BridgeQuote } from '@/utils/types'
import { useState, useEffect, useMemo } from 'react'

import { BridgeQuote } from '@/utils/types'
import { convertMsToSeconds } from '@/utils/time'

export const BridgeQuoteResetTimer = ({
bridgeQuote,
isActive,
Expand Down Expand Up @@ -39,26 +41,6 @@ const AnimatedProgressCircle = ({
}, [animateKey])

return (
// <svg
// key={animationKey}
// width="24"
// height="24"
// viewBox="-12 -12 24 24"
// stroke="currentcolor"
// stroke-opacity=".33"
// fill="none"
// className="absolute -rotate-90"
// >
// <circle r="8" />
// <circle r="8" stroke-dasharray="1" pathLength="1">
// <animate
// attributeName="stroke-dashoffset"
// values="2; 1"
// dur={`${convertMsToSeconds(duration)}s`}
// fill="freeze"
// />
// </circle>
// </svg>
<svg
key={animationKey}
width="24"
Expand Down Expand Up @@ -102,7 +84,3 @@ const AnimatedProgressCircle = ({
</svg>
)
}

const convertMsToSeconds = (ms: number) => {
return Math.ceil(ms / 1000)
}
4 changes: 4 additions & 0 deletions packages/synapse-interface/utils/time.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,7 @@ export const isTimestampToday = (unixTimestamp: number): boolean => {
dateFromTimestamp.getFullYear() === currentDate.getFullYear()
)
}

export const convertMsToSeconds = (ms: number) => {
return Math.ceil(ms / 1000)
}

0 comments on commit 1c5414f

Please sign in to comment.