Merge pull request #73 from codex-storage/releases/v0.0.12

Releases/v0.0.12
This commit is contained in:
Arnaud 2024-11-13 07:33:30 +07:00 committed by GitHub
commit e341deac68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 38 additions and 38 deletions

View File

@ -178,7 +178,7 @@ export function HealthChecks({ online, onStepValid }: Props) {
) : portForwarding.enabled ? (
<SuccessCircleIcon></SuccessCircleIcon>
) : (
<WarningIcon width={16} />
<WarningIcon />
)}
</span>
Port forwarding

View File

@ -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";
@ -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 (
<>

View File

@ -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";
@ -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) {

View File

@ -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";
@ -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 (
<OnBoardingLayout defaultIsStepValid={false} step={1}>