mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-10-25 20:47:58 +09:00
fix: show validation result after switching views
This commit is contained in:
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,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user