Skip to content

Commit

Permalink
fix notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
ciyer committed Dec 18, 2024
1 parent 2c3fa83 commit a93bd26
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export default function ProjectUnlinkTemplate({
project,
}: ProjectUnlinkTemplateProps) {
const [patchProject, result] = usePatchProjectsByProjectIdMutation();
const navigate = useNavigate();
const { notifications } = useContext(AppContext);
const onUnlink = useCallback(() => {
patchProject({
Expand All @@ -64,8 +63,9 @@ export default function ProjectUnlinkTemplate({
if (result.isSuccess) {
if (notifications)
notificationProjectDeleted(notifications, project.name);
result.reset();
}
}, [result.isSuccess, navigate, notifications, project.name]);
}, [notifications, project.name, result]);

const [typedName, setTypedName] = useState("");
const onChange = useCallback(
Expand Down
5 changes: 5 additions & 0 deletions tests/cypress/e2e/projectV2.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,11 @@ describe("Project templates and copies", () => {

it("break the template link", () => {
fixtures
.readProjectV2({
overrides: {
template_id: "TEMPLATE-ULID",
},
})
.getProjectV2Permissions()
.listNamespaceV2()
.copyProjectV2()
Expand Down

0 comments on commit a93bd26

Please sign in to comment.