diff --git a/features/oauth-callback/ui/LoadingProcess.tsx b/features/oauth-callback/ui/LoadingProcess.tsx index 29e0982..e5a7a7c 100644 --- a/features/oauth-callback/ui/LoadingProcess.tsx +++ b/features/oauth-callback/ui/LoadingProcess.tsx @@ -1,10 +1,11 @@ "use client"; import React from "react"; -import { CircularProgress } from "@heroui/react"; +import { addToast, Button, CircularProgress, Link } from "@heroui/react"; import { SendCallbackToServer } from "../lib/sendCallbackToServer"; import { useParams } from "next/navigation"; import { useRunOnce } from "@/shared/hooks/useRunOnce"; +import { routes } from "@/shared/config/routes"; const LoadingProcess = () => { // Access the URL parameters @@ -20,6 +21,21 @@ const LoadingProcess = () => { window.close(); } catch (error) { console.log(error); + addToast({ + title: "Oops, lost connection!", + description: "Check your internet and try again", + color: "danger", + timeout: 0, + endContent: ( + + ), + }); } }); return ( diff --git a/providers/HeroUIWrapper.tsx b/providers/HeroUIWrapper.tsx index b771966..9eba17e 100644 --- a/providers/HeroUIWrapper.tsx +++ b/providers/HeroUIWrapper.tsx @@ -1,7 +1,7 @@ "use client"; import React, { useEffect, useState } from "react"; -import { HeroUIProvider } from "@heroui/react"; +import { HeroUIProvider, ToastProvider } from "@heroui/react"; import { ThemeProvider as NextThemesProvider } from "next-themes"; import { useRouter } from "next/navigation"; @@ -17,6 +17,7 @@ const HeroUIWrapper = ({ return ( + {mounted ? (
{children}