Ignore:
Timestamp:
01/28/26 12:13:13 (5 months ago)
Author:
Tome <gjorgievtome@…>
Branches:
main
Children:
1d8f088
Parents:
e03e6fb (diff), 87b79bc (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge remote-tracking branch 'origin/main'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • components/AddComponentDialog.tsx

    re03e6fb ra744c90  
    2020];
    2121
    22 export default function AddComponentDialog({ open, onClose, onSuccess }: {
     22export default function AddComponentDialog({ open, onClose, onSuccess, prefillData }: {
    2323    open: boolean;
    2424    onClose: () => void;
    2525    onSuccess: () => void;
     26    prefillData?: {
     27        type?: string;
     28        suggestionLink?: string;
     29        suggestionDescription?: string;
     30    };
    2631}) {
    2732    const [name, setName] = useState('');
     
    6873        }
    6974    }, [type]);
     75
     76    useEffect(() => {
     77        if (open && prefillData) {
     78            if (prefillData.type) setType(prefillData.type);
     79        }
     80    }, [open, prefillData]);
    7081
    7182    const handleFieldChange = (fieldName: string, value: any) => {
Note: See TracChangeset for help on using the changeset viewer.