Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

Wrap handleCallback, too

François Zaninotto284e32734fd7
diff --git a/src/components/atomic-crm/root/CRM.tsx b/src/components/atomic-crm/root/CRM.tsx
index 0e36d2b0..26d4e190 100644
--- a/src/components/atomic-crm/root/CRM.tsx
+++ b/src/components/atomic-crm/root/CRM.tsx
@@ -175,6 +175,23 @@ export const CRM = ({
}
return result;
},
+ handleCallback: async (params: any) => {
+ if (!authProvider.handleCallback) {
+ throw new Error(
+ "handleCallback is not implemented in the authProvider",
+ );
+ }
+ const result = await authProvider.handleCallback(params);
+ try {
+ const config = await dataProvider.getConfiguration();
+ if (Object.keys(config).length > 0) {
+ store.setItem(CONFIGURATION_STORE_KEY, config);
+ }
+ } catch {
+ // Non-critical: config will load via useConfigurationLoader
+ }
+ return result;
+ },
logout: async (params: any) => {
try {
store.removeItem(CONFIGURATION_STORE_KEY);