From 8f0bd76128fb1bb3f6b05189728c6628373dead0 Mon Sep 17 00:00:00 2001 From: Web3Knight Date: Tue, 7 Oct 2025 19:58:10 +0200 Subject: [PATCH 1/2] [Refactor] useZoraCreate => useCreateMoment --- hooks/{useZoraCreate.tsx => useCreateMoment.tsx} | 2 +- providers/MomentCreateProvider.tsx | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) rename hooks/{useZoraCreate.tsx => useCreateMoment.tsx} (97%) diff --git a/hooks/useZoraCreate.tsx b/hooks/useCreateMoment.tsx similarity index 97% rename from hooks/useZoraCreate.tsx rename to hooks/useCreateMoment.tsx index 6576fcde..7721fbc3 100644 --- a/hooks/useZoraCreate.tsx +++ b/hooks/useCreateMoment.tsx @@ -7,7 +7,7 @@ import useZoraCreateParameters from "./useZoraCreateParameters"; import { useMask } from "./useMask"; import { useUserProvider } from "@/providers/UserProvider"; -export default function useZoraCreate() { +export default function useCreateMoment() { const [creating, setCreating] = useState(false); const searchParams = useSearchParams(); const collection = searchParams.get("collectionAddress") as Address; diff --git a/providers/MomentCreateProvider.tsx b/providers/MomentCreateProvider.tsx index d178e7b6..ac7077a3 100644 --- a/providers/MomentCreateProvider.tsx +++ b/providers/MomentCreateProvider.tsx @@ -1,12 +1,14 @@ "use client"; -import useZoraCreate from "@/hooks/useZoraCreate"; +import useCreateMoment from "@/hooks/useCreateMoment"; import React, { createContext, useContext, useMemo } from "react"; -const MomentCreateContext = createContext | undefined>(undefined); +const MomentCreateContext = createContext | undefined>( + undefined +); const MomentCreateProvider = ({ children }: { children: React.ReactNode }) => { - const zoraCreate = useZoraCreate(); + const zoraCreate = useCreateMoment(); const value = useMemo(() => ({ ...zoraCreate }), [zoraCreate]); From 7fa0a644d87c3e4737ec82cdf5e1a89d01fe9156 Mon Sep 17 00:00:00 2001 From: Web3Knight Date: Wed, 8 Oct 2025 02:17:33 +0200 Subject: [PATCH 2/2] [Refactor] useZoraCreateParameters => useMomentCreateParameters --- hooks/useCreateMoment.tsx | 4 ++-- ...ZoraCreateParameters.tsx => useMomentCreateParameters.tsx} | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename hooks/{useZoraCreateParameters.tsx => useMomentCreateParameters.tsx} (94%) diff --git a/hooks/useCreateMoment.tsx b/hooks/useCreateMoment.tsx index 7721fbc3..b212d2e0 100644 --- a/hooks/useCreateMoment.tsx +++ b/hooks/useCreateMoment.tsx @@ -3,7 +3,7 @@ import { useState } from "react"; import { useSearchParams } from "next/navigation"; import { Address } from "viem"; -import useZoraCreateParameters from "./useZoraCreateParameters"; +import useMomentCreateParameters from "./useMomentCreateParameters"; import { useMask } from "./useMask"; import { useUserProvider } from "@/providers/UserProvider"; @@ -13,7 +13,7 @@ export default function useCreateMoment() { const collection = searchParams.get("collectionAddress") as Address; const [createdContract, setCreatedContract] = useState(""); const [createdTokenId, setCreatedTokenId] = useState(""); - const { fetchParameters, createMetadata, advancedValues } = useZoraCreateParameters(collection); + const { fetchParameters, createMetadata, advancedValues } = useMomentCreateParameters(collection); const mask = useMask(advancedValues.isOpenAdvanced, createMetadata.writingText); const { isPrepared } = useUserProvider(); diff --git a/hooks/useZoraCreateParameters.tsx b/hooks/useMomentCreateParameters.tsx similarity index 94% rename from hooks/useZoraCreateParameters.tsx rename to hooks/useMomentCreateParameters.tsx index 64694b01..e10fb77f 100644 --- a/hooks/useZoraCreateParameters.tsx +++ b/hooks/useMomentCreateParameters.tsx @@ -8,7 +8,7 @@ import { useFrameProvider } from "@/providers/FrameProvider"; import getSaleConfigType from "@/lib/getSaleConfigType"; import useCreateAdvancedValues from "./useCreateAdvancedValues"; -const useZoraCreateParameters = (collection?: Address) => { +const useMomentCreateParameters = (collection?: Address) => { const { connectedWallet } = useConnectedWallet(); const { address } = useAccount(); const createMetadata = useCreateMetadata(); @@ -59,4 +59,4 @@ const useZoraCreateParameters = (collection?: Address) => { return { createMetadata, fetchParameters, advancedValues }; }; -export default useZoraCreateParameters; +export default useMomentCreateParameters;