refactor: memoize icons on export

This commit is contained in:
rusconn
2023-06-24 09:26:37 +09:00
parent 257080b00d
commit 240fba0e74
14 changed files with 74 additions and 101 deletions

View File

@@ -83,11 +83,9 @@ export default function Page() {
const onJsonChange: EditorProps["onChange"] = value => setJsonReactively(value ?? "");
const onYamlChange: EditorProps["onChange"] = value => setYamlReactively(value ?? "");
const indentationIcon = useMemo(() => <icons.Space size={24} className="-translate-y-1.5" />, []);
const indentationConfig = (
<Configuration
icon={indentationIcon}
icon={<icons.Space size={24} className="-translate-y-1.5" />}
title="Indentation"
control={
<Select value={form.indentation} onValueChange={onIndentationChange}>