mirror of
https://github.com/ershisan99/DevToysWeb.git
synced 2025-12-29 20:49:26 +00:00
refactor: memoize icons on export
This commit is contained in:
@@ -37,12 +37,10 @@ export default function Page() {
|
||||
const onInputChange: TextareaProps["onChange"] = ({ currentTarget: { value } }) =>
|
||||
setInput(value);
|
||||
|
||||
const uppercaseIcon = useMemo(() => <icons.CaseSensitive size={24} />, []);
|
||||
|
||||
const uppercaseConfig = useMemo(
|
||||
() => (
|
||||
<Configuration
|
||||
icon={uppercaseIcon}
|
||||
icon={<icons.CaseSensitive size={24} />}
|
||||
title="Uppercase"
|
||||
control={
|
||||
<LabeledSwitch
|
||||
@@ -55,7 +53,7 @@ export default function Page() {
|
||||
}
|
||||
/>
|
||||
),
|
||||
[uppercase, uppercaseIcon]
|
||||
[uppercase]
|
||||
);
|
||||
|
||||
const inputPasteButton = useMemo(() => <PasteButton onClipboardRead={setInput} />, []);
|
||||
|
||||
Reference in New Issue
Block a user