Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

refactor: remove onPrevious from theme onboarding route

Brad Barbin9411d6ffcbc6
diff --git a/apps/carbon/app/routes/onboarding+/theme.tsx b/apps/carbon/app/routes/onboarding+/theme.tsx
index b2df75c531..5573406e98 100644
--- a/apps/carbon/app/routes/onboarding+/theme.tsx
+++ b/apps/carbon/app/routes/onboarding+/theme.tsx
@@ -13,7 +13,7 @@ import {
import { themes, type Theme } from "@carbon/utils";
import type { ActionFunctionArgs, LoaderFunctionArgs } from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
-import { useLoaderData } from "@remix-run/react";
+import { Link, useLoaderData } from "@remix-run/react";
import { useEffect, useState } from "react";
import { RxCheck } from "react-icons/rx";
import { ValidatedForm, validationError } from "remix-validated-form";
@@ -99,7 +99,7 @@ export default function OnboardingTheme() {
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [mode]);
- const { next, previous, onPrevious } = useOnboarding();
+ const { next, previous } = useOnboarding();
return (
<Card className="max-w-lg">
@@ -159,12 +159,12 @@ export default function OnboardingTheme() {
variant="solid"
isDisabled={!previous}
size="md"
- onClick={() => {
- onPrevious?.();
- }}
+ asChild
tabIndex={-1}
>
- Previous
+ <Link to={previous} prefetch="intent">
+ Previous
+ </Link>
</Button>
)}