video poster & default address royalty
This commit is contained in:
1 parent
a81aee843f
commit
9c4851d35f
2 files changed
+18
-4
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { useMemo, useState } from "react";
|
||||
import { useEffect, useMemo, useState } from "react";
|
||||
import { useHapticFeedback } from "@vkruglikov/react-telegram-web-app";
|
||||
|
||||
import { Input } from "~/shared/ui/input";
|
||||
@@ -11,6 +11,7 @@ import { Spread } from "~/shared/ui/icons/spread.tsx";
|
||||
import { ConfirmModal } from "~/pages/root/steps/royalty-step/components/confirm-modal";
|
||||
import { useRootStore } from "~/shared/stores/root";
|
||||
import { BackButton } from "~/shared/ui/back-button";
|
||||
import { useTonConnectUI } from "@tonconnect/ui-react";
|
||||
|
||||
type RoyaltyStepProps = {
|
||||
prevStep(): void;
|
||||
@@ -71,6 +72,16 @@ export const RoyaltyStep = ({ nextStep, prevStep }: RoyaltyStepProps) => {
|
||||
);
|
||||
}, [royalty]);
|
||||
|
||||
const [tonConnectUI] = useTonConnectUI();
|
||||
|
||||
// Устанавливаем адрес из tonConnectUI.account при загрузке страницы
|
||||
useEffect(() => {
|
||||
console.log('tonconnectUI', tonConnectUI)
|
||||
if (tonConnectUI.account) {
|
||||
setRoyalty([{ address: tonConnectUI.account.address, value: 100 }]);
|
||||
}
|
||||
}, [tonConnectUI.account, setRoyalty]);
|
||||
|
||||
return (
|
||||
<section className={"mt-4 px-4 pb-8"}>
|
||||
{isPercentHintOpen && (
|
||||
|
||||
Reference in new issue
Block a user