Skip to content

Commit

Permalink
chore: disable redirect to telegram
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemSBulgakov committed Mar 31, 2024
1 parent 28e09dc commit 0bfa0d6
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions app/account/connect-telegram/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import TelegramLogin from "@/components/account/TelegramLogin";
import SignInButton from "@/components/common/SignInButton";
import { useMe } from "@/lib/auth/user";
import { useRouter, useSearchParams } from "next/navigation";
import { useEffect } from "react";
import { useIsClient } from "usehooks-ts";

export default function Page() {
Expand All @@ -14,16 +13,6 @@ export default function Page() {

const bot = searchParams.get("bot");

useEffect(() => {
if (me?.telegram) {
if (bot) {
router.push(`https://t.me/${bot}`);
} else {
router.push("/dashboard");
}
}
}, [bot, me?.telegram, router]);

if (!isClient || !me) {
return (
<>
Expand Down

0 comments on commit 0bfa0d6

Please sign in to comment.