Skip to content

Commit

Permalink
feature(unlock-app): Update ToastHelper imports (#15569)
Browse files Browse the repository at this point in the history
* update imports

* clean up

* update package.json

* update yarn.lock

* clean up
  • Loading branch information
0xTxbi authored Feb 27, 2025
1 parent fe280e5 commit 4af85df
Show file tree
Hide file tree
Showing 105 changed files with 105 additions and 174 deletions.
1 change: 0 additions & 1 deletion unlock-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"react-google-autocomplete": "2.7.4",
"react-gtm-module": "2.0.11",
"react-hook-form": "7.53.2",
"react-hot-toast": "2.4.1",
"react-icons": "5.3.0",
"react-markdown": "9.0.3",
"react-to-print": "3.0.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { networks } from '@unlock-protocol/networks'
import { useState } from 'react'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'

import { formDataToMetadata } from '~/components/interface/locks/metadata/utils'
import { CertificationForm, NewCertificationForm } from './CertificationForm'
Expand Down
2 changes: 1 addition & 1 deletion unlock-app/src/components/content/event/CopyUrlButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Tooltip } from '@unlock-protocol/ui'
import { BiShareAlt } from 'react-icons/bi'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'

import useClipboard from 'react-use-clipboard'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useMutation } from '@tanstack/react-query'
import { ethers } from 'ethers'
import { config } from '~/config/app'
import KickbackAbi from '../../Settings/Components/Kickback/KickbackAbi'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import { useGetApprovedRefunds } from '~/hooks/useGetApprovedRefunds'
import { useMemo } from 'react'
import { EventLocksExplorerLinks } from './EventLocksExplorerLinks'
Expand Down
2 changes: 1 addition & 1 deletion unlock-app/src/components/content/event/NewEvent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { useState } from 'react'
import { Form, NewEventForm } from './Form'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import { LockDeploying } from './LockDeploying'
import { locksmith } from '~/config/locksmith'
import { networks } from '@unlock-protocol/networks'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Controller, useForm } from 'react-hook-form'
import { useEffect, useState } from 'react'
import { useConfig } from '~/utils/withConfig'
import { MintingScreen } from '~/components/interface/checkout/main/Minting'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import { TransactionStatus } from '~/components/interface/checkout/main/checkoutMachine'
import { onResolveName } from '~/utils/resolvers'
import { MetadataInputType } from '@unlock-protocol/core'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { useMultipleLockData } from '~/hooks/useLockData'
import { useState } from 'react'
import { useCustomEmailSend } from '~/hooks/useCustomEmail'
import { useForm } from 'react-hook-form'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'

interface EmailsProps {
event: Event
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import { config } from '~/config/app'
import { useWeb3Service } from '~/utils/withWeb3Service'
import { ethers } from 'ethers'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Button, Modal, TextBox } from '@unlock-protocol/ui'
import { Event, PaywallConfigType } from '@unlock-protocol/core'
import { useState } from 'react'
import { useForm } from 'react-hook-form'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import { validateEmail } from '~/components/interface/checkout/main/utils'
import { useSendInvites } from '~/hooks/useSendInvites'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { locksmith } from '~/config/locksmith'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import { Button, Input } from '@unlock-protocol/ui'
import { formDataToMetadata } from '@unlock-protocol/core'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
ToggleSwitch,
} from '@unlock-protocol/ui'
import { useImageUpload } from '~/hooks/useImageUpload'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import { useEffect, useState } from 'react'
import { config } from '~/config/app'
import dayjs from 'dayjs'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { useLockData } from '~/hooks/useLockData'
import { onResolveName } from '~/utils/resolvers'
import { Controller, useForm } from 'react-hook-form'
import { useReferrerFee } from '~/hooks/useReferrerFee'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'

import CopyUrlButton from '../CopyUrlButton'
import { getEventUrl } from '../utils'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Event, PaywallConfigType } from '@unlock-protocol/core'
import { SetKickbackContractAsLockManager } from './Components/Kickback/SetKickbackContractAsLockManager'
import { SaveRootForRefunds } from './Components/Kickback/SaveRootForRefunds'
import { useGetApprovedRefunds } from '~/hooks/useGetApprovedRefunds'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import { useAttendeeRefund } from '~/hooks/useAttendeeRefund'

export interface StakeRefundProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState } from 'react'
import { Button, Modal } from '@unlock-protocol/ui'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import { useWeb3Service } from '~/utils/withWeb3Service'
import { MAX_UINT } from '~/constants'
import { locksmith } from '~/config/locksmith'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState } from 'react'
import { Button, Modal } from '@unlock-protocol/ui'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import { locksmith } from '~/config/locksmith'

interface ApproveAttendeeModalProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { getCheckInTime } from '~/utils/getCheckInTime'
import { locksmith } from '~/config/locksmith'
import { FaCheckCircle as CheckIcon } from 'react-icons/fa'
import { useMutation } from '@tanstack/react-query'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import { UpdateEmailModal } from './UpdateEmailModal'
import { FieldValues } from 'react-hook-form'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Button, Input, Modal } from '@unlock-protocol/ui'
import { useState } from 'react'
import { FieldValues, useForm } from 'react-hook-form'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import { useUpdateUserMetadata } from '~/hooks/useUserMetadata'

export const UpdateEmailModal = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { useEvent } from '~/hooks/useEvent'
import { useState, useEffect, useCallback } from 'react'
import Link from 'next/link'
import { useAddToEventCollection } from '~/hooks/useEventCollection'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import { TransactionDetails } from '../event/NewEvent'
import { locksmith } from '~/config/locksmith'
import { formDataToMetadata } from '~/components/interface/locks/metadata/utils'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
import { Button, ImageUpload, Input, TextBox } from '@unlock-protocol/ui'
import { useImageUpload } from '~/hooks/useImageUpload'
import { EventCollection } from '@unlock-protocol/unlock-js'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import { locksmith } from '~/config/locksmith'
import { useCallback, useRef } from 'react'
import { LinksField } from '../LinksField'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { useCallback, useState } from 'react'
import { ONE_DAY_IN_SECONDS, UNLIMITED_KEYS_COUNT } from '~/constants'
import networks from '@unlock-protocol/networks'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import { useMutation } from '@tanstack/react-query'
import { CreateLockForm } from '~/components/interface/locks/Create/elements/CreateLockForm'
import { CreateLockFormSummary } from '~/components/interface/locks/Create/elements/CreateLockFormSummary'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Button, Drawer, Input } from '@unlock-protocol/ui'
import { useMutation } from '@tanstack/react-query'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'

import { useForm } from 'react-hook-form'
import { MAX_UINT } from '~/constants'
Expand Down
65 changes: 0 additions & 65 deletions unlock-app/src/components/helpers/toast.helper.ts

This file was deleted.

2 changes: 1 addition & 1 deletion unlock-app/src/components/interface/AddressLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { BiCopy as CopyIcon } from 'react-icons/bi'
import { HiOutlineExternalLink as ExternalLinkIcon } from 'react-icons/hi'

import { useConfig } from '~/utils/withConfig'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'

interface AddressLinkProps {
address: string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from 'react'
import { ToastHelper } from '../helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import { Button, Input, Modal } from '@unlock-protocol/ui'
import { useProvider } from '~/hooks/useProvider'

Expand Down
2 changes: 1 addition & 1 deletion unlock-app/src/components/interface/Picker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { graphService } from '~/config/subgraph'
import { LockImage } from '../locks/Manage/elements/LockPicker'
import Link from 'next/link'
import { ethers } from 'ethers'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import networks from '@unlock-protocol/networks'
import { FiExternalLink as ExternalLinkIcon } from 'react-icons/fi'

Expand Down
2 changes: 1 addition & 1 deletion unlock-app/src/components/interface/PromptEmailLink.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client'

import { useLinkAccount } from '@privy-io/react-auth'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import { useModalStatus } from '@privy-io/react-auth'
import { useEffect } from 'react'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Button, Drawer, Input } from '@unlock-protocol/ui'
import { useForm } from 'react-hook-form'
import { useUpdateReceipt } from '~/hooks/useReceipts'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'

type PurchaserBodyProps = any
export interface Props {
Expand Down
2 changes: 1 addition & 1 deletion unlock-app/src/components/interface/VerificationStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
MembershipCard,
MembershipCardPlaceholder,
} from './verification/MembershipCard'
import { ToastHelper } from '../helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import { MembershipVerificationConfig } from '~/utils/verification'
import { invalidMembership } from './verification/invalidMembership'
import { Button, Modal } from '@unlock-protocol/ui'
Expand Down
2 changes: 1 addition & 1 deletion unlock-app/src/components/interface/WrappedAddress.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useCallback } from 'react'
import { Address } from '@unlock-protocol/ui'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import networks from '@unlock-protocol/networks'
import { resolveAddress } from '~/hooks/useNameResolver'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CheckoutService } from './checkoutMachine'
import { Button, Checkbox } from '@unlock-protocol/ui'
import { Fragment, useState } from 'react'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import { useSelector } from '@xstate/react'
import { PoweredByUnlock } from '../PoweredByUnlock'
import { Stepper } from '../Stepper'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
} from '@stripe/stripe-js'
import { PoweredByUnlock } from '../PoweredByUnlock'
import { Stepper } from '../Stepper'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import { useForm } from 'react-hook-form'
import { locksmith } from '~/config/locksmith'
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Fragment } from 'react'
import { useSelector } from '@xstate/react'
import { CheckoutCommunication } from '~/hooks/useCheckoutCommunication'
import { Stepper } from '../Stepper'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import { ConfirmClaim } from './Confirm/ConfirmClaim'
import { ConfirmCard } from './Confirm/ConfirmCard'
import { ConfirmCrossmint } from './Confirm/ConfirmCrossmint'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { useGetTotalCharges } from '~/hooks/usePrice'
import { useGetLockSettings } from '~/hooks/useLockSettings'
import { getCurrencySymbol } from '~/utils/currency'
import Disconnect from '../Disconnect'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'

interface Props {
checkoutService: CheckoutService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { CheckoutService } from './../checkoutMachine'
import { useConfig } from '~/utils/withConfig'
import { Button } from '@unlock-protocol/ui'
import { Fragment, useState } from 'react'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import { useSelector } from '@xstate/react'
import { PoweredByUnlock } from '../../PoweredByUnlock'
import { Pricing } from '../../Lock'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CheckoutService } from './checkoutMachine'
import { Button } from '@unlock-protocol/ui'
import { Fragment, useState } from 'react'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import { useSelector } from '@xstate/react'
import { PoweredByUnlock } from '../PoweredByUnlock'
import { Stepper } from '../Stepper'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
import { Button, Input, Placeholder } from '@unlock-protocol/ui'
import { twMerge } from 'tailwind-merge'
import { formResultToMetadata } from '~/utils/userMetadata'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import { useSelector } from '@xstate/react'
import { PoweredByUnlock } from '../PoweredByUnlock'
import { Stepper } from '../Stepper'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { RiExternalLinkLine as ExternalLinkIcon } from 'react-icons/ri'
import { useConfig } from '~/utils/withConfig'
import { Fragment, useEffect, useState } from 'react'
import { ethers } from 'ethers'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import { useSelector } from '@xstate/react'
import { useCheckoutCommunication } from '~/hooks/useCheckoutCommunication'
import { PoweredByUnlock } from '../PoweredByUnlock'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { FaCheck } from 'react-icons/fa'
import { FaXmark } from 'react-icons/fa6'
import { Button, Input, Badge } from '@unlock-protocol/ui'
import { Fragment, useEffect, useState } from 'react'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import { useSelector } from '@xstate/react'
import { PoweredByUnlock } from '../PoweredByUnlock'
import { Stepper } from '../Stepper'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CheckoutService } from './checkoutMachine'
import { Button, Input, Badge } from '@unlock-protocol/ui'
import { Fragment, useEffect, useState } from 'react'
import { ToastHelper } from '~/components/helpers/toast.helper'
import { ToastHelper } from '@unlock-protocol/ui'
import { useSelector } from '@xstate/react'
import { PoweredByUnlock } from '../PoweredByUnlock'
import { Stepper } from '../Stepper'
Expand Down
Loading

0 comments on commit 4af85df

Please sign in to comment.