From 4ab21cc9f36e323c683604b34a3a8ff17a616a34 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Wed, 13 Nov 2024 07:29:47 +0700 Subject: [PATCH 1/3] Remove keyboard motions --- src/routes/index.tsx | 20 ++++++++++---------- src/routes/onboarding-checks.tsx | 24 ++++++++++++------------ src/routes/onboarding-name.tsx | 24 ++++++++++++------------ 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/routes/index.tsx b/src/routes/index.tsx index 2b843a7..12323e0 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -26,18 +26,18 @@ function Index() { const onNextStep = () => navigate({ to: "/onboarding-name" }); - useEffect(() => { - const onKeyPress = (event: Event) => { - const e = event as KeyboardEvent; - if (e.key === "ArrowRight") { - navigate({ to: "/onboarding-name" }); - } - }; + // useEffect(() => { + // const onKeyPress = (event: Event) => { + // const e = event as KeyboardEvent; + // if (e.key === "ArrowRight") { + // navigate({ to: "/onboarding-name" }); + // } + // }; - document.addEventListener("keydown", onKeyPress); + // document.addEventListener("keydown", onKeyPress); - return () => document.removeEventListener("keydown", onKeyPress); - }, [navigate]); + // return () => document.removeEventListener("keydown", onKeyPress); + // }, [navigate]); return ( <> diff --git a/src/routes/onboarding-checks.tsx b/src/routes/onboarding-checks.tsx index ac51a1c..f87a56a 100644 --- a/src/routes/onboarding-checks.tsx +++ b/src/routes/onboarding-checks.tsx @@ -14,20 +14,20 @@ const OnBoardingChecks = () => { const [isStepValid, setIsStepValid] = useState(false); const navigate = useNavigate({ from: "/onboarding-checks" }); - useEffect(() => { - const onKeyPress = (event: Event) => { - const e = event as KeyboardEvent; - if (e.key === "ArrowRight" && isStepValid) { - navigate({ to: "/dashboard" }); - } else if (e.key === "ArrowLeft") { - navigate({ to: "/onboarding-name" }); - } - }; + // useEffect(() => { + // const onKeyPress = (event: Event) => { + // const e = event as KeyboardEvent; + // if (e.key === "ArrowRight" && isStepValid) { + // navigate({ to: "/dashboard" }); + // } else if (e.key === "ArrowLeft") { + // navigate({ to: "/onboarding-name" }); + // } + // }; - document.addEventListener("keydown", onKeyPress); + // document.addEventListener("keydown", onKeyPress); - return () => document.removeEventListener("keydown", onKeyPress); - }, [navigate, isStepValid]); + // return () => document.removeEventListener("keydown", onKeyPress); + // }, [navigate, isStepValid]); const onNextStep = () => { if (isStepValid) { diff --git a/src/routes/onboarding-name.tsx b/src/routes/onboarding-name.tsx index 09faacf..4f4845f 100644 --- a/src/routes/onboarding-name.tsx +++ b/src/routes/onboarding-name.tsx @@ -21,20 +21,20 @@ const OnBoardingName = () => { } }; - useEffect(() => { - const onKeyPress = (event: Event) => { - const e = event as KeyboardEvent; - if (e.key === "ArrowRight") { - navigate({ to: "/onboarding-checks" }); - } else if (e.key === "ArrowLeft") { - navigate({ to: "/" }); - } - }; + // useEffect(() => { + // const onKeyPress = (event: Event) => { + // const e = event as KeyboardEvent; + // if (e.key === "ArrowRight") { + // navigate({ to: "/onboarding-checks" }); + // } else if (e.key === "ArrowLeft") { + // navigate({ to: "/" }); + // } + // }; - document.addEventListener("keydown", onKeyPress); + // document.addEventListener("keydown", onKeyPress); - return () => document.removeEventListener("keydown", onKeyPress); - }, [navigate]); + // return () => document.removeEventListener("keydown", onKeyPress); + // }, [navigate]); return ( From c791e76a4b05be2eeff0ec5af09ca6b23faf16f3 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Wed, 13 Nov 2024 07:29:57 +0700 Subject: [PATCH 2/3] Fix icon size --- src/components/HealthChecks/HealthChecks.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/HealthChecks/HealthChecks.tsx b/src/components/HealthChecks/HealthChecks.tsx index abc16dd..3a3525b 100644 --- a/src/components/HealthChecks/HealthChecks.tsx +++ b/src/components/HealthChecks/HealthChecks.tsx @@ -178,7 +178,7 @@ export function HealthChecks({ online, onStepValid }: Props) { ) : portForwarding.enabled ? ( ) : ( - + )} Port forwarding From 027d756fb1f186fcb86610c0442719f96413817a Mon Sep 17 00:00:00 2001 From: Arnaud Date: Wed, 13 Nov 2024 07:31:49 +0700 Subject: [PATCH 3/3] Remove unused import --- src/routes/index.tsx | 2 +- src/routes/onboarding-checks.tsx | 2 +- src/routes/onboarding-name.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/routes/index.tsx b/src/routes/index.tsx index 12323e0..a79445e 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -1,5 +1,5 @@ import { createFileRoute, useNavigate } from "@tanstack/react-router"; -import { useEffect, useState } from "react"; +import { useState } from "react"; import { Modal } from "@codex-storage/marketplace-ui-components"; import { ArrowRight } from "lucide-react"; import { OnBoardingLayout } from "../components/OnBoarding/OnBoardingLayout"; diff --git a/src/routes/onboarding-checks.tsx b/src/routes/onboarding-checks.tsx index f87a56a..3d6a5ec 100644 --- a/src/routes/onboarding-checks.tsx +++ b/src/routes/onboarding-checks.tsx @@ -1,5 +1,5 @@ import { createFileRoute, useNavigate } from "@tanstack/react-router"; -import { useEffect, useState } from "react"; +import { useState } from "react"; import { attributes } from "../utils/attributes"; import ArrowRightCircle from "../assets/icons/arrow-circle.svg?react"; import { OnBoardingLayout } from "../components/OnBoarding/OnBoardingLayout"; diff --git a/src/routes/onboarding-name.tsx b/src/routes/onboarding-name.tsx index 4f4845f..834a2c6 100644 --- a/src/routes/onboarding-name.tsx +++ b/src/routes/onboarding-name.tsx @@ -1,5 +1,5 @@ import { createFileRoute, useNavigate } from "@tanstack/react-router"; -import { useEffect, useState } from "react"; +import { useState } from "react"; import { OnBoardingLayout } from "../components/OnBoarding/OnBoardingLayout"; import { attributes } from "../utils/attributes"; import ArrowRightCircle from "../assets/icons/arrow-circle.svg?react";