@sirendesign/markup 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -37521,6 +37521,15 @@ const MarkupWidget = ({ config: userConfig, }) => {
37521
37521
  require$$0.useEffect(() => {
37522
37522
  if (userConfig) {
37523
37523
  setConfig(userConfig);
37524
+ // Auto-initialize Firebase if config provided and not already initialized
37525
+ if (userConfig.firebaseConfig && getApps().length === 0) {
37526
+ try {
37527
+ initializeFirebase(userConfig.firebaseConfig);
37528
+ }
37529
+ catch (error) {
37530
+ console.error('Failed to initialize Firebase:', error);
37531
+ }
37532
+ }
37524
37533
  }
37525
37534
  }, [userConfig, setConfig]);
37526
37535
  require$$0.useEffect(() => {