-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8585bc2
commit d6b758a
Showing
17 changed files
with
132 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 0 additions & 34 deletions
34
src/app/[lang]/trigger/components/TriggerRowActions/ModalDeleteConfig.tsx
This file was deleted.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
src/app/[lang]/trigger/components/TriggerRowActions/ModalDeleteTrigger.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
"use client"; | ||
|
||
import Modal from "@/components/common/Modal"; | ||
import useDictionaries from "@/hooks/useDictionaries"; | ||
import { useRouter } from "next/navigation"; | ||
import { deleteTrigger } from "../../server-actions"; | ||
|
||
interface IModalDeleteTrigger { | ||
triggerName: string; | ||
modalId: string; | ||
} | ||
const ModalDeleteTrigger = (props: IModalDeleteTrigger) => { | ||
const { triggerName, modalId } = props; | ||
const router = useRouter(); | ||
const dict = useDictionaries(); | ||
|
||
const deleteWithId = async () => { | ||
await deleteTrigger(triggerName); | ||
router.refresh(); | ||
}; | ||
|
||
return ( | ||
<Modal | ||
actionCallback={deleteWithId} | ||
action={dict.global.delete} | ||
cancel={dict.global.cancel} | ||
description={dict.trigger.modalConfirmDeleteRow} | ||
modalId={modalId} | ||
title={dict.trigger.modalDeleteRowTitle} | ||
/> | ||
); | ||
}; | ||
|
||
export default ModalDeleteTrigger; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.