Skip to content

Commit

Permalink
ts prune
Browse files Browse the repository at this point in the history
  • Loading branch information
aeolianeth committed May 26, 2024
1 parent eff05a6 commit 9be04bd
Show file tree
Hide file tree
Showing 13 changed files with 3 additions and 657 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,132 +243,3 @@ export const FundingCyclesPage = () => {
</Form>
)
}

// TODO: I really wanted this to work. If anyone can make it work, go for it.
// const DateTimePicker: React.FC = ({
// value,
// onChange,
// }: {
// value: moment.Moment | null
// onChange: (val: moment.Moment | null) => void
// }) => {
// const [date, setDate] = useState<moment.Moment | null>(null)

// const disabledDate = useCallback((date: moment.Moment) => {
// const now = moment()
// return date.startOf('day').isBefore(now.startOf('day'))
// }, [])

// const disabledTime = useCallback(() => {
// const now = moment()
// if (date && date.isSame(now, 'day')) {
// const disabledHours = range(0, 24).splice(0, now.hour() + 1)
// return {
// disabledHours: () => disabledHours,
// }
// }
// return {}
// }, [date])

// const onDateChanged = useCallback(
// (value: moment.Moment | null) => {
// console.log('onDateChanged', value)
// // Value will always set to 00:00:00, so adjust accordingly

// if (!value) {
// setDate(null)
// return
// }

// console.log('date', date)
// const previousTime = date
// ?.clone()
// .day(value.day())
// .month(value.month())
// .year(value.year())

// console.log('previousTime', previousTime)

// const now = moment()

// if (value.isSame(now, 'day')) {
// if (previousTime) {
// if (previousTime < now.add(1, 'hour')) {
// setDate(now.clone().add(1, 'hour').startOf('minute'))
// } else {
// setDate(previousTime.clone())
// }
// return
// }
// setDate(now.clone().add(1, 'hour').startOf('minute'))
// return
// }

// setDate(previousTime?.clone() ?? value.clone())

// // console.log('wraeth', { hour: value.hour(), minute: value.minute() })
// // if (value.hour() === 0 && value.minute() === 0) {
// // // set newDate hour to 11
// // // set newDate minute to 59
// // const newDate = value
// // .clone()
// // .hour(now.hour())
// // .minute(now.minute())
// // .second(0)
// // setDate(newDate)
// // return
// // }

// // setDate(value)
// },
// [date],
// )

// const onTimeChanged = useCallback(
// (value: moment.Moment | null) => {
// console.log('onTimeChanged', value)
// if (!value || !date) {
// return
// }
// const newDate = date
// .hour(value.hour())
// .minute(value.minute())
// .second(value.second())
// setDate(newDate.clone())
// },
// [date],
// )

// const onClearClicked = useCallback(() => {
// setDate(null)
// }, [])

// return (
// <span className="flex items-center gap-3">
// <JuiceDatePicker
// picker="date"
// disabledDate={disabledDate}
// value={date}
// onChange={onDateChanged}
// />
// {date && (
// <JuiceDatePicker
// showNow={false}
// allowClear={false}
// disabledTime={disabledTime}
// value={date}
// onChange={onTimeChanged}
// // value={time}
// // onChange={onTimeChanged}
// picker="time"
// />
// )}
// {date && (
// <CloseCircleFilled
// className="text-lg leading-none text-grey-500"
// onClick={onClearClicked}
// />
// )}
// </span>
// )
// }
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { reloadWindow } from 'utils/windowUtils'
import { V2V3ClaimTokensModal } from '../../V2V3ManageTokensSection/AccountBalanceDescription/V2V3ClaimTokensModal'
import { useProjectContext } from '../hooks/useProjectContext'

export type ClaimErc20CalloutProps = {
type ClaimErc20CalloutProps = {
className?: string
unclaimed: BigNumber
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { useProjectPageQueries } from '../hooks/useProjectPageQueries'
import { useTokensPanel } from '../hooks/useTokensPanel'
import { useTokensPerEth } from '../hooks/useTokensPerEth'

export type EthPerTokenAccordianProps = {
type EthPerTokenAccordianProps = {
className?: string
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ type Redeems = {
enabled: boolean
}

export type PayRedeemCardProps = {
type PayRedeemCardProps = {
className?: string
}

Expand Down
Loading

0 comments on commit 9be04bd

Please sign in to comment.