refactor: webhooks (#2896)

* refactor: webhooks workflow

* chore: update delete modal content
This commit is contained in:
Aaryan Khandelwal
2023-11-27 17:15:48 +05:30
committed by sriram veeraghanta
parent 6e940399cb
commit 726f4668e0
29 changed files with 812 additions and 835 deletions

View File

@@ -16,7 +16,7 @@ const StoreWrapper: FC<IStoreWrapper> = observer((props) => {
const { children } = props;
// router
const router = useRouter();
const { workspaceSlug, projectId, cycleId, moduleId, globalViewId, viewId, inboxId } = router.query;
const { workspaceSlug, projectId, cycleId, moduleId, globalViewId, viewId, inboxId, webhookId } = router.query;
// store
const {
theme: { sidebarCollapsed, toggleSidebar },
@@ -28,6 +28,7 @@ const StoreWrapper: FC<IStoreWrapper> = observer((props) => {
globalViews: { setGlobalViewId },
projectViews: { setViewId },
inbox: { setInboxId },
webhook: { setCurrentWebhookId },
appConfig: { fetchAppConfig },
} = useMobxStore();
// fetching application Config
@@ -74,6 +75,7 @@ const StoreWrapper: FC<IStoreWrapper> = observer((props) => {
setGlobalViewId(globalViewId?.toString() ?? null);
setViewId(viewId?.toString() ?? null);
setInboxId(inboxId?.toString() ?? null);
setCurrentWebhookId(webhookId?.toString() ?? undefined);
}, [
workspaceSlug,
projectId,
@@ -82,6 +84,7 @@ const StoreWrapper: FC<IStoreWrapper> = observer((props) => {
globalViewId,
viewId,
inboxId,
webhookId,
setWorkspaceSlug,
setProjectId,
setCycleId,
@@ -89,6 +92,7 @@ const StoreWrapper: FC<IStoreWrapper> = observer((props) => {
setGlobalViewId,
setViewId,
setInboxId,
setCurrentWebhookId,
]);
return <>{children}</>;