Skip to content

Commit

Permalink
Merge pull request #380 from bettersg/feat/popup-link-in-onboarding
Browse files Browse the repository at this point in the history
updated links
  • Loading branch information
sarge1989 authored Jul 14, 2024
2 parents 0f19171 + 1a2b309 commit 33d3e46
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions checkers-app/src/pages/Onboarding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
window.Telegram.WebApp.openLink(url);
} else {
window.open(url, "_blank");
}
}

const NameForm = ({
name,
setName,
Expand Down Expand Up @@ -67,8 +75,8 @@ const StepTwo = () => {
<br />
<a
className="underline text-checkLink"
target="_blank"
href="https://bit.ly/checkmate-privacy"
onClick={() => openLink("https://bit.ly/checkmate-privacy")}
href="#"
>
https://bit.ly/checkmate-privacy
</a>
Expand All @@ -88,8 +96,8 @@ const StepThree = () => {
<p>
<a
className="underline text-checkLink"
target="_blank"
href="https://bit.ly/checkmates-quiz)"
onClick={() => openLink("https://bit.ly/checkmates-quiz")}
href="#"
>
https://bit.ly/checkmates-quiz
</a>
Expand All @@ -116,8 +124,8 @@ const StepFour = () => {
<p>
<a
className="underline text-checkLink"
target="_blank"
href="https://bit.ly/checkmates-groupchat)"
onClick={() => openLink("https://bit.ly/checkmates-groupchat")}
href="#"
>
https://bit.ly/checkmates-groupchat
</a>
Expand All @@ -131,8 +139,8 @@ const StepFour = () => {
<p>
<a
className="underline text-checkLink"
target="_blank"
href="https://bit.ly/checkmates-wiki)"
onClick={() => openLink("https://bit.ly/checkmates-wiki")}
href="#"
>
https://bit.ly/checkmates-wiki
</a>
Expand Down

0 comments on commit 33d3e46

Please sign in to comment.