From b3ac127915b7d67a4a7d134e53c368ce7d1d6603 Mon Sep 17 00:00:00 2001 From: OJ Abba Date: Wed, 2 Jul 2025 11:18:12 +0100 Subject: [PATCH] =?UTF-8?q?[Chore]=20Introduce=20errors=20=F0=9F=92=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/LoadingAppPage/LoadingAppPage.tsx | 35 +++++++++++++++++---- 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/src/pages/LoadingAppPage/LoadingAppPage.tsx b/src/pages/LoadingAppPage/LoadingAppPage.tsx index 0150076..b8704e9 100644 --- a/src/pages/LoadingAppPage/LoadingAppPage.tsx +++ b/src/pages/LoadingAppPage/LoadingAppPage.tsx @@ -1,16 +1,39 @@ import { LoadingSpinner } from "@deskpro/app-sdk"; import { useSetTitle } from "../../hooks"; -import { useCheckAuth } from "./hooks"; -import type { FC } from "react"; +// import { useCheckAuth } from "./hooks"; +import { useEffect, useState, type FC } from "react"; +import { Button } from "@deskpro/deskpro-ui"; const LoadingAppPage: FC = () => { - useCheckAuth(); + // useCheckAuth(); useSetTitle("Linear"); - return ( - - ); + const [errorState, setErrorState] = useState(null) + + useEffect(() => { + if (errorState === "left") { + throw new Error("Hello from Linear") + } + + if (errorState === "right") { + throw "HI from Linear" + } + }, [errorState]) + + return ( + <> +