@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.esm.js CHANGED
@@ -37517,6 +37517,15 @@ const MarkupWidget = ({ config: userConfig, }) => {
37517
37517
  useEffect(() => {
37518
37518
  if (userConfig) {
37519
37519
  setConfig(userConfig);
37520
+ // Auto-initialize Firebase if config provided and not already initialized
37521
+ if (userConfig.firebaseConfig && getApps().length === 0) {
37522
+ try {
37523
+ initializeFirebase(userConfig.firebaseConfig);
37524
+ }
37525
+ catch (error) {
37526
+ console.error('Failed to initialize Firebase:', error);
37527
+ }
37528
+ }
37520
37529
  }
37521
37530
  }, [userConfig, setConfig]);
37522
37531
  useEffect(() => {