mirror of
https://github.com/ershisan99/DevToysWeb.git
synced 2025-12-17 04:59:23 +00:00
refactor: memoize icons on export
This commit is contained in:
@@ -20,12 +20,10 @@ import { PageSection } from "@/components/page-section";
|
||||
export default function Page() {
|
||||
const { theme = "system", setTheme } = useTheme();
|
||||
|
||||
const appThemeIcon = useMemo(() => <icons.Paintbrush size={24} />, []);
|
||||
|
||||
const appThemeConfig = useMemo(
|
||||
() => (
|
||||
<Configuration
|
||||
icon={appThemeIcon}
|
||||
icon={<icons.Paintbrush size={24} />}
|
||||
title="App theme"
|
||||
description="Select which app theme to display"
|
||||
control={
|
||||
@@ -45,7 +43,7 @@ export default function Page() {
|
||||
}
|
||||
/>
|
||||
),
|
||||
[appThemeIcon, setTheme, theme]
|
||||
[setTheme, theme]
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user