Protofy-xyz / Protofy

AI Supercharged LowCode Platform CMS and Framework 🚀🚀
https://protofy.xyz/
MIT License
222 stars 44 forks source link

Duplicated import line when adding the same two components #77

Closed jjjorgina closed 6 months ago

jjjorgina commented 6 months ago

Expected Behavior

When using the visual UI editor, adding the same component multiple times (e.g., two buttons) should not result in duplication of import lines and should not cause the page to crash upon saving.

Current Behavior

Using the visual UI editor, when adding the same component multiple times (e.g., two buttons), the import line duplicates, leading to page crashes upon saving.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Create a new page.
  2. Access the visual UI editor.
  3. Add a Button component.
  4. Add another Button component.
  5. Save the changes.

Context (Environment)

Issue demo

https://github.com/Protofy-xyz/Protofy/assets/111370411/0850367c-319c-4683-ba8c-3d5b3ed51371

mikecmart commented 6 months ago

Fixed