Skip to content

Commit cc0cc47

Browse files
committed
perf: memo Activity
Signed-off-by: Innei <[email protected]>
1 parent 2f0fffe commit cc0cc47

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/layout/header/internal/Activity.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const appLabels: { [app: string]: string } = {
6161
cmusic: 'cmusic',
6262
}
6363
// autocorrect: true
64-
export function Activity() {
64+
export const Activity = memo(() => {
6565
const [isEnabled, setIsEnabled] = useState(true)
6666

6767
const activity = useActivity()
@@ -161,7 +161,8 @@ export function Activity() {
161161
</AnimatePresence>
162162
</>
163163
)
164-
}
164+
})
165+
Activity.displayName = 'Activity'
165166
const cMusicProps = { processName: 'cmusic' }
166167
const TriggerComponent = memo<{
167168
processName: string

0 commit comments

Comments
 (0)