From e60da1905c566e59563a8289d83499563187dcbd Mon Sep 17 00:00:00 2001 From: Space-Banane Date: Sat, 14 Mar 2026 00:00:17 +0100 Subject: [PATCH] fix: wrap rotatingMessages in useMemo for performance optimization --- src/App.tsx | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 59cbbd2..7ce25bd 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -37,20 +37,23 @@ function App() { "Space-Banane (2022-2024)", ]; - const rotatingMessages = [ - "Yelling at Claude", - "Shipping bugs", - "Compiling typescript files... Please wait.", - "Waiting for CI, this might take a while...", - "No debugger attached, but I'm sure it works ?", - "Seems fine, must be a problem with your machine lol", - "Waiting for pip, this might take a lifetime...", - "Collecting Spotify hours, this might take a while...", - "Fighting with go modules, i lost", - "Nuking Python for the 50th time, it's winning", - "Why is uv so cool?", - "Pulling 20-ish GB of node modules, see you next year" - ]; + const rotatingMessages = useMemo( + () => [ + "Yelling at Claude", + "Shipping bugs", + "Compiling typescript files... Please wait.", + "Waiting for CI, this might take a while...", + "No debugger attached, but I'm sure it works ?", + "Seems fine, must be a problem with your machine lol", + "Waiting for pip, this might take a lifetime...", + "Collecting Spotify hours, this might take a while...", + "Fighting with go modules, i lost", + "Nuking Python for the 50th time, it's winning", + "Why is uv so cool?", + "Pulling 20-ish GB of node modules, see you next year", + ], + [], + ); const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()-_=+[]{}|;:',.<>?/`~" +