| Auth on view content
This commit is contained in:
parent
778db1ce9c
commit
a81aee843f
|
|
@ -20,10 +20,7 @@ export const ViewContentPage = () => {
|
||||||
|
|
||||||
const auth = useAuth();
|
const auth = useAuth();
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
void tonConnectUI.disconnect()
|
|
||||||
void auth.mutateAsync()
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
const handleBuyContent = useCallback(async () => {
|
const handleBuyContent = useCallback(async () => {
|
||||||
try {
|
try {
|
||||||
|
|
@ -31,6 +28,8 @@ export const ViewContentPage = () => {
|
||||||
await tonConnectUI.openModal();
|
await tonConnectUI.openModal();
|
||||||
await auth.mutateAsync();
|
await auth.mutateAsync();
|
||||||
return
|
return
|
||||||
|
} else {
|
||||||
|
await auth.mutateAsync()
|
||||||
}
|
}
|
||||||
|
|
||||||
const contentResponse = await purchaseContent({
|
const contentResponse = await purchaseContent({
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue