From a81aee843f35043dcfb2f6571b6fce6654903689 Mon Sep 17 00:00:00 2001 From: rakhimovkamran Date: Mon, 28 Oct 2024 16:46:19 +0500 Subject: [PATCH] | Auth on view content --- src/pages/view-content/index.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pages/view-content/index.tsx b/src/pages/view-content/index.tsx index dbe1f21..4f8eeeb 100644 --- a/src/pages/view-content/index.tsx +++ b/src/pages/view-content/index.tsx @@ -20,10 +20,7 @@ export const ViewContentPage = () => { const auth = useAuth(); - useEffect(() => { - void tonConnectUI.disconnect() - void auth.mutateAsync() - }, []); + const handleBuyContent = useCallback(async () => { try { @@ -31,6 +28,8 @@ export const ViewContentPage = () => { await tonConnectUI.openModal(); await auth.mutateAsync(); return + } else { + await auth.mutateAsync() } const contentResponse = await purchaseContent({