diff --git a/apps/consent/app/login/phone/page.tsx b/apps/consent/app/login/phone/page.tsx index 4d447a18da..9529557f8a 100644 --- a/apps/consent/app/login/phone/page.tsx +++ b/apps/consent/app/login/phone/page.tsx @@ -11,4 +11,5 @@ const Login = async ({ searchParams }: { searchParams: LoginProps }) => { const authAction = "Login" return } + export default Login diff --git a/apps/pay/components/parse-pos-payment/index.tsx b/apps/pay/components/parse-pos-payment/index.tsx index 3adf92e37c..f7170982e8 100644 --- a/apps/pay/components/parse-pos-payment/index.tsx +++ b/apps/pay/components/parse-pos-payment/index.tsx @@ -13,7 +13,7 @@ import { parseDisplayCurrency, } from "../../utils/utils" -import { useDisplayCurrency } from "../../lib/use-display-currency" +import { useDisplayCurrency } from "../../hooks/use-display-currency" import Memo from "../memo" diff --git a/apps/pay/components/parse-pos-payment/receive-invoice.tsx b/apps/pay/components/parse-pos-payment/receive-invoice.tsx index f3d3f80f48..cb076768c8 100644 --- a/apps/pay/components/parse-pos-payment/receive-invoice.tsx +++ b/apps/pay/components/parse-pos-payment/receive-invoice.tsx @@ -12,7 +12,7 @@ import { useScreenshot } from "use-react-screenshot" import { USD_INVOICE_EXPIRE_INTERVAL } from "../../config/config" import useCreateInvoice from "../../hooks/use-create-Invoice" import { LnInvoiceObject } from "../../lib/graphql/index.types" -import useSatPrice from "../../lib/use-sat-price" +import useSatPrice from "../../hooks/use-sat-price" import { ACTION_TYPE } from "../../app/reducer" import PaymentOutcome from "../payment-outcome" import { Share } from "../share" @@ -24,7 +24,7 @@ import LoadingComponent from "../loading" import styles from "./parse-payment.module.css" import NFCComponent from "./nfc" -import useRealtimePrice from "@/lib/use-realtime-price" +import useRealtimePrice from "@/hooks/use-realtime-price" interface Props { recipientWalletCurrency?: string diff --git a/apps/pay/lib/use-display-currency.tsx b/apps/pay/hooks/use-display-currency.tsx similarity index 91% rename from apps/pay/lib/use-display-currency.tsx rename to apps/pay/hooks/use-display-currency.tsx index e35c512021..1262dc2b7f 100644 --- a/apps/pay/lib/use-display-currency.tsx +++ b/apps/pay/hooks/use-display-currency.tsx @@ -1,7 +1,9 @@ import { gql } from "@apollo/client" -import { useCurrencyListQuery } from "./graphql/generated" + import { useCallback, useMemo } from "react" +import { useCurrencyListQuery } from "./graphql/generated" + gql` query currencyList { currencyList { @@ -52,10 +54,13 @@ export const useDisplayCurrency = () => { const displayCurrencyDictionary = useMemo(() => { const currencyList = dataCurrencyList?.currencyList || [] - return currencyList.reduce((acc, currency) => { - acc[currency.id] = currency - return acc - }, {} as Record) + return currencyList.reduce( + (acc, currency) => { + acc[currency.id] = currency + return acc + }, + {} as Record, + ) }, [dataCurrencyList?.currencyList]) const formatCurrency = useCallback( diff --git a/apps/pay/lib/use-realtime-price.tsx b/apps/pay/hooks/use-realtime-price.tsx similarity index 98% rename from apps/pay/lib/use-realtime-price.tsx rename to apps/pay/hooks/use-realtime-price.tsx index a93c580ee2..c5316958cc 100644 --- a/apps/pay/lib/use-realtime-price.tsx +++ b/apps/pay/hooks/use-realtime-price.tsx @@ -1,11 +1,12 @@ import { gql, SubscriptionResult } from "@apollo/client" import * as React from "react" + import { RealtimePriceWsSubscription, useRealtimePriceInitialQuery, useRealtimePriceWsSubscription, } from "../lib/graphql/generated" -import { useDisplayCurrency } from "../lib/use-display-currency" +import { useDisplayCurrency } from "../hooks/use-display-currency" gql` subscription realtimePriceWs($currency: DisplayCurrency!) { diff --git a/apps/pay/lib/use-sat-price.tsx b/apps/pay/hooks/use-sat-price.tsx similarity index 100% rename from apps/pay/lib/use-sat-price.tsx rename to apps/pay/hooks/use-sat-price.tsx