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.

fix: toaster not showing up

Brad Barbin9c201824f617
diff --git a/apps/carbon/app/root.tsx b/apps/carbon/app/root.tsx
index 0171cbc25c..4ab51c3200 100644
--- a/apps/carbon/app/root.tsx
+++ b/apps/carbon/app/root.tsx
@@ -1,5 +1,5 @@
// root.tsx
-import { Button, Heading, Toaster, toast } from "@carbon/react";
+import { Button, Heading, toast } from "@carbon/react";
import { validator } from "@carbon/remix-validated-form";
import type {
ActionFunctionArgs,
@@ -118,10 +118,10 @@ function Document({
</head>
<body className="h-full bg-background">
{children}
+
<ScrollRestoration />
<Scripts />
<Analytics />
- <Toaster />
{process.env.NODE_ENV === "development" && <LiveReload />}
</body>
</html>
diff --git a/apps/carbon/app/routes/x+/_layout.tsx b/apps/carbon/app/routes/x+/_layout.tsx
index 2aefd5176f..bab26324c2 100644
--- a/apps/carbon/app/routes/x+/_layout.tsx
+++ b/apps/carbon/app/routes/x+/_layout.tsx
@@ -1,3 +1,4 @@
+import { Toaster, TooltipProvider } from "@carbon/react";
import type { LoaderFunctionArgs } from "@remix-run/node";
import { json, redirect } from "@remix-run/node";
import { Outlet, useLoaderData, useNavigation } from "@remix-run/react";
@@ -20,7 +21,6 @@ import {
} from "~/services/session.server";
import { path } from "~/utils/path";
-import { TooltipProvider } from "@carbon/react";
import type { ShouldRevalidateFunction } from "@remix-run/react";
export const shouldRevalidate: ShouldRevalidateFunction = ({
@@ -112,6 +112,7 @@ export default function AuthenticatedRoute() {
</div>
</div>
</div>
+ <Toaster richColors position="bottom-right" />
</div>
</TooltipProvider>
</RealtimeDataProvider>
diff --git a/apps/carbon/app/routes/x+/resources+/departments.$departmentId.tsx b/apps/carbon/app/routes/x+/resources+/departments.$departmentId.tsx
index b8bbab0d06..bc232dbf2c 100644
--- a/apps/carbon/app/routes/x+/resources+/departments.$departmentId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/departments.$departmentId.tsx
@@ -72,7 +72,7 @@ export async function action({ request }: ActionFunctionArgs) {
throw redirect(
path.to.departments,
- await flash(request, success("Department updated."))
+ await flash(request, success("Department updated"))
);
}
diff --git a/apps/carbon/app/routes/x+/resources+/departments.new.tsx b/apps/carbon/app/routes/x+/resources+/departments.new.tsx
index 19667a8e7d..f43b1f801e 100644
--- a/apps/carbon/app/routes/x+/resources+/departments.new.tsx
+++ b/apps/carbon/app/routes/x+/resources+/departments.new.tsx
@@ -59,7 +59,7 @@ export async function action({ request }: ActionFunctionArgs) {
? json(createDepartment, { status: 201 })
: redirect(
path.to.departments,
- await flash(request, success("Department created."))
+ await flash(request, success("Department created"))
);
}
diff --git a/apps/carbon/app/routes/x+/resources+/holidays.$holidayId.tsx b/apps/carbon/app/routes/x+/resources+/holidays.$holidayId.tsx
index 9343122da3..dfafb69e5f 100644
--- a/apps/carbon/app/routes/x+/resources+/holidays.$holidayId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/holidays.$holidayId.tsx
@@ -72,7 +72,7 @@ export async function action({ request }: ActionFunctionArgs) {
throw redirect(
path.to.holidays,
- await flash(request, success("Holiday updated."))
+ await flash(request, success("Holiday updated"))
);
}
diff --git a/apps/carbon/app/routes/x+/resources+/holidays.new.tsx b/apps/carbon/app/routes/x+/resources+/holidays.new.tsx
index e0a48b9a08..b771625544 100644
--- a/apps/carbon/app/routes/x+/resources+/holidays.new.tsx
+++ b/apps/carbon/app/routes/x+/resources+/holidays.new.tsx
@@ -47,7 +47,7 @@ export async function action({ request }: ActionFunctionArgs) {
throw redirect(
path.to.holidays,
- await flash(request, success("Holiday created."))
+ await flash(request, success("Holiday created"))
);
}
diff --git a/apps/carbon/app/routes/x+/resources+/locations.$locationId.tsx b/apps/carbon/app/routes/x+/resources+/locations.$locationId.tsx
index 2e617e51eb..0530ba0679 100644
--- a/apps/carbon/app/routes/x+/resources+/locations.$locationId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/locations.$locationId.tsx
@@ -73,7 +73,7 @@ export async function action({ request }: ActionFunctionArgs) {
throw redirect(
path.to.locations,
- await flash(request, success("Location updated."))
+ await flash(request, success("Location updated"))
);
}
diff --git a/apps/carbon/app/routes/x+/resources+/partners.$supplierLocationId.$abilityId.tsx b/apps/carbon/app/routes/x+/resources+/partners.$supplierLocationId.$abilityId.tsx
index 2efe836fd7..32ab76bdc0 100644
--- a/apps/carbon/app/routes/x+/resources+/partners.$supplierLocationId.$abilityId.tsx
+++ b/apps/carbon/app/routes/x+/resources+/partners.$supplierLocationId.$abilityId.tsx
@@ -71,7 +71,7 @@ export async function action({ request }: ActionFunctionArgs) {
throw redirect(
path.to.partners,
- await flash(request, success("Partner updated."))
+ await flash(request, success("Partner updated"))
);
}
diff --git a/apps/carbon/app/routes/x+/resources+/partners.new.tsx b/apps/carbon/app/routes/x+/resources+/partners.new.tsx
index bb02ebf3b1..d8adfc88e7 100644
--- a/apps/carbon/app/routes/x+/resources+/partners.new.tsx
+++ b/apps/carbon/app/routes/x+/resources+/partners.new.tsx
@@ -47,7 +47,7 @@ export async function action({ request }: ActionFunctionArgs) {
throw redirect(
path.to.partners,
- await flash(request, success("Partner created."))
+ await flash(request, success("Partner created"))
);
}
diff --git a/apps/carbon/app/routes/x+/resources+/shifts.new.tsx b/apps/carbon/app/routes/x+/resources+/shifts.new.tsx
index debb22ee89..3a5b178a2f 100644
--- a/apps/carbon/app/routes/x+/resources+/shifts.new.tsx
+++ b/apps/carbon/app/routes/x+/resources+/shifts.new.tsx
@@ -33,13 +33,13 @@ export async function action({ request }: ActionFunctionArgs) {
if (createShift.error) {
throw redirect(
path.to.shifts,
- await flash(request, error(createShift.error, "Failed to create shift."))
+ await flash(request, error(createShift.error, "Failed to create shift"))
);
}
throw redirect(
path.to.shifts,
- await flash(request, success("Shift created."))
+ await flash(request, success("Shift created"))
);
}
diff --git a/apps/website/next-env.d.ts b/apps/website/next-env.d.ts
new file mode 100644
index 0000000000..4f11a03dc6
--- /dev/null
+++ b/apps/website/next-env.d.ts
@@ -0,0 +1,5 @@
+/// <reference types="next" />
+/// <reference types="next/image-types/global" />
+
+// NOTE: This file should not be edited
+// see https://nextjs.org/docs/basic-features/typescript for more information.
diff --git a/www/pages/develop/core-concepts/writing.mdx b/www/pages/develop/core-concepts/writing.mdx
index e1081aaf3c..fbd00df4ff 100644
--- a/www/pages/develop/core-concepts/writing.mdx
+++ b/www/pages/develop/core-concepts/writing.mdx
@@ -106,7 +106,7 @@ export async function action({ request }: ActionFunctionArgs) {
throw redirect(
"/path/to/the/next/page",
- await flash(request, success("Person created."))
+ await flash(request, success("Person created"))
);
```