Skip to content

Commit

Permalink
Merge pull request #584 from DataRecce/feature/drc-1032-show-3-detect…
Browse files Browse the repository at this point in the history
…-change-notifications-when-i-did-one-model

[Feature] Prevent duplicate artifacts change notification
  • Loading branch information
wcchang1115 authored Jan 17, 2025
2 parents dfe22a5 + 22b20f2 commit d777694
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions js/src/lib/hooks/LineageGraphContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,18 @@ function useLineageWatcher() {
const { eventType, srcPath } = data.event;
const [targetName, fileName] = srcPath.split("/").slice(-2);
const name = path.parse(fileName).name;
artifactsUpdatedToast({
description: `Detected ${targetName} ${name} ${eventType}`,
status: "info",
variant: "left-accent",
position: "bottom-right",
duration: 5000,
isClosable: true,
});
const eventId = `${targetName}-${name}-${eventType}`;
if (!artifactsUpdatedToast.isActive(eventId)) {
artifactsUpdatedToast({
id: eventId,
description: `Detected ${targetName} ${name} ${eventType}`,
status: "info",
variant: "left-accent",
position: "bottom-right",
duration: 5000,
isClosable: true,
});
}
invalidateCaches();
} else if (data.command === "relaunch") {
setEnvStatus("relaunch");
Expand Down

0 comments on commit d777694

Please sign in to comment.