fix: show validation result after switching views

This commit is contained in:
Oleg Isonen committed 2026-10-21 09:34:30 +01:00
1 parent 3839a27cae
commit 1b532637a7
2 files changed
+2 -2

No files matched your search

@@ -142,7 +142,7 @@ test("clears the validation result when the publish popover closes", async () =>
test.each([
{ destination: "none" as const, expectedToasts: 1 },
{ destination: "export" as const, expectedToasts: 0 },
{ destination: "export" as const, expectedToasts: 1 },
{ destination: "publish" as const, expectedToasts: 0 },
])(
"reports validation success after switching to $destination",
@@ -21,7 +21,7 @@ export const usePublishValidationState = (
const update = useCallback(
(state: PublishValidationState) => {
if (state === "passed" && dialogRef.current === "none") {
if (state === "passed" && dialogRef.current !== "publish") {
toast.success("Validation passed. Ready to publish.", {
duration: Number.POSITIVE_INFINITY,
});