From 4475d75035a9d4d201951f7beecaeed0c8dac52d Mon Sep 17 00:00:00 2001 From: Alaister Young Date: Mon, 17 Jul 2023 16:09:30 +0800 Subject: [PATCH] hotfix: webhooks not installing in ui --- studio/pages/project/[ref]/database/hooks/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/studio/pages/project/[ref]/database/hooks/index.tsx b/studio/pages/project/[ref]/database/hooks/index.tsx index ac953ba9c61..12e370a7d77 100644 --- a/studio/pages/project/[ref]/database/hooks/index.tsx +++ b/studio/pages/project/[ref]/database/hooks/index.tsx @@ -34,8 +34,8 @@ const HooksPage: NextPageWithLayout = () => { const canCreateWebhooks = useCheckPermissions(PermissionAction.TENANT_SQL_ADMIN_WRITE, 'triggers') useEffect(() => { - if (project?.ref) meta.hooks.load() - }, [project?.ref]) + if (ui.selectedProjectRef) meta.hooks.load() + }, [ui.selectedProjectRef]) const enableHooksForProject = async () => { const res = await post(`${API_URL}/database/${ref}/hook-enable`, {})