mirror of
https://github.com/ershisan99/DevToysWeb.git
synced 2026-01-27 12:34:23 +00:00
refactor: memoize buttons on export
This commit is contained in:
@@ -142,12 +142,8 @@ export default function Page() {
|
||||
[generates]
|
||||
);
|
||||
|
||||
const uuidsCopyButton = useMemo(() => <CopyButton text={uuidsString} />, [uuidsString]);
|
||||
|
||||
const uuidsClearButton = useMemo(
|
||||
() => <ClearButton onClick={clearUuids} iconOnly aria-label="clear uuids" />,
|
||||
[clearUuids]
|
||||
);
|
||||
const uuidsCopyButton = <CopyButton text={uuidsString} />;
|
||||
const uuidsClearButton = <ClearButton onClick={clearUuids} iconOnly aria-label="clear uuids" />;
|
||||
|
||||
const uuidsControl = <ControlMenu list={[uuidsCopyButton, uuidsClearButton]} />;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user