mirror of
https://github.com/mue/mue.git
synced 2026-07-22 16:27:32 +02:00
perf: use memo, fix quicklinks key err
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { useState } from 'react';
|
||||
import { useState, memo } from 'react';
|
||||
import { TextareaAutosize } from '@mui/material';
|
||||
import { MdAddLink, MdClose } from 'react-icons/md';
|
||||
import Tooltip from 'components/helpers/tooltip/Tooltip';
|
||||
|
||||
import variables from 'modules/variables';
|
||||
|
||||
export default function AddModal({ urlError, addLink, closeModal, edit, editData, editLink }) {
|
||||
function AddModal({ urlError, addLink, closeModal, edit, editData, editLink }) {
|
||||
const [name, setName] = useState(edit ? editData.name : '');
|
||||
const [url, setUrl] = useState(edit ? editData.url : '');
|
||||
const [icon, setIcon] = useState(edit ? editData.url : '');
|
||||
@@ -55,3 +55,5 @@ export default function AddModal({ urlError, addLink, closeModal, edit, editData
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default memo(AddModal);
|
||||
Reference in New Issue
Block a user