call auth.twa even if (tonConnectUI.connected) on welcome step

enlarge gif
This commit is contained in:
Oleg Yakovenko 2024-07-14 21:34:17 +03:00
parent 08dc809e9d
commit f875a6afc0
1 changed files with 4 additions and 1 deletions

View File

@ -20,6 +20,9 @@ console.log('💩💩💩 enter WelcomeStep');
const handleNextClick = async () => { const handleNextClick = async () => {
if (tonConnectUI.connected) { if (tonConnectUI.connected) {
const res = await auth.mutateAsync();
sessionStorage.setItem("auth_v1_token", res.data.auth_v1_token);
nextStep(); nextStep();
} else { } else {
await tonConnectUI.openModal(); await tonConnectUI.openModal();
@ -46,7 +49,7 @@ console.log('💩💩💩 enter WelcomeStep');
<section <section
className={"relative flex h-[100vh] items-center justify-center"} className={"relative flex h-[100vh] items-center justify-center"}
> >
<img alt={"splash"} className={"mb-20 h-[100px]"} src={"/splash.gif"} /> <img alt={"splash"} className={"mb-20 h-[500px]"} src={"/splash.gif"} />
</section> </section>
); );
} }