diff --git a/src/components/SetupBanner.tsx b/src/components/SetupBanner.tsx
index b742658..92d3e7a 100644
--- a/src/components/SetupBanner.tsx
+++ b/src/components/SetupBanner.tsx
@@ -27,7 +27,8 @@ import { usePostHog } from "posthog-js/react";
type NodeInstallStep =
| "install"
| "waiting-for-continue"
- | "continue-processing";
+ | "continue-processing"
+ | "finished-checking";
export function SetupBanner() {
const posthog = usePostHog();
@@ -81,6 +82,7 @@ export function SetupBanner() {
setNodeInstallStep("continue-processing");
await IpcClient.getInstance().reloadEnvPath();
await checkNode();
+ setNodeInstallStep("finished-checking");
}, [checkNode, setNodeInstallStep]);
// We only check for node version because pnpm is not required for the app to run.
@@ -185,22 +187,11 @@ export function SetupBanner() {
.
)}
- {nodeInstallStep === "install" ? (
-
- ) : (
-
- )}
+
)}
@@ -313,3 +304,47 @@ function NodeJsHelpCallout() {
);
}
+
+function NodeInstallButton({
+ nodeInstallStep,
+ handleNodeInstallClick,
+ finishNodeInstall,
+}: {
+ nodeInstallStep: NodeInstallStep;
+ handleNodeInstallClick: () => void;
+ finishNodeInstall: () => void;
+}) {
+ switch (nodeInstallStep) {
+ case "install":
+ return (
+
+ );
+ case "continue-processing":
+ return (
+
+ );
+ case "waiting-for-continue":
+ return (
+
+ );
+ case "finished-checking":
+ return (
+
+ Node.js not detected. Closing and re-opening Dyad usually fixes this.
+
+ );
+ default:
+ const _exhaustiveCheck: never = nodeInstallStep;
+ }
+}