diff --git a/checkers-app/src/pages/Onboarding.tsx b/checkers-app/src/pages/Onboarding.tsx index 42caea61..20b31cf9 100644 --- a/checkers-app/src/pages/Onboarding.tsx +++ b/checkers-app/src/pages/Onboarding.tsx @@ -7,6 +7,14 @@ import { signInWithToken, signOut } from "../utils/authManagement"; import { Alert, Button } from "@material-tailwind/react"; import PhoneInput from "react-phone-number-input"; +function openLink(url: string) { + if (window.Telegram.WebApp) { + Telegram.WebApp.openLink(url); + } else { + window.open(url, "_blank"); + } +} + const NameForm = ({ name, setName, @@ -67,8 +75,8 @@ const StepTwo = () => {
openLink("https://bit.ly/checkmate-privacy")} + href="#" > https://bit.ly/checkmate-privacy @@ -88,8 +96,8 @@ const StepThree = () => {

openLink("https://bit.ly/checkmates-quiz")} + href="#" > https://bit.ly/checkmates-quiz @@ -116,8 +124,8 @@ const StepFour = () => {

openLink("https://bit.ly/checkmates-groupchat")} + href="#" > https://bit.ly/checkmates-groupchat @@ -131,8 +139,8 @@ const StepFour = () => {

openLink("https://bit.ly/checkmates-wiki")} + href="#" > https://bit.ly/checkmates-wiki